function bouncer(arr){ return arr.filter(function(v){ return (v && v === +v); }); } itog = bouncer([false, null, 0, NaN, undefined, "",78]); alert(JSON.stringify(itog));