A Tricky Javascript code snippet
What's the output of the code below - and why?
const nums = [0, 1, 2, 3];
const filtered = nums.filter(Boolean);
console.log(filtered);
What's the output of the code below - and why?
const nums = [0, 1, 2, 3];
const filtered = nums.filter(Boolean);
console.log(filtered);