Answers for "can you push falsy values to array"

0

can you push falsy values to array

var myFilterArray = myArray.filter(Boolean);
Posted by: Guest on March-03-2020
0

can you push falsy values to array

function bouncer(arr) {
  return arr.filter(function(v) { return !!v; });
}
Posted by: Guest on March-03-2020

Code answers related to "can you push falsy values to array"

Browse Popular Code Answers by Language