function removeFalsy(arr) {
let newArr = [];
for ( let i = 0 ; i < arr.length; i++ ) {
if( Boolean(arr[i]) === true) {
newArr.push(arr[i]);
}
}
return newArr;
}
//Falsy values are : false, null, 0, "", undefined, and NaN.
console.log(removeFalsy([7, "ate", "", false, 9])); //[7, "ate", 9]