Remove all falsy values from an array.
Falsy values in JavaScript are false, null, 0, "", undefined, and NaN.
Here are some helpful links:
function bouncer(arr) {
// Don't show a false ID to this bouncer.
// arr.filter(falsi);
var result = arr.filter(falsi);
console.log('RESULT => ', result);
overlay(JSON.stringify(result));
return result;
}
function falsi(value) {
if (typeof(value) !== false || '' || null || 0 || undefined || NaN ) {
return value;
}
}