return arr.filter(function(x){ for(var i=2; i < x; i++){ if(x%i === 0){ return 0; } }return x === 1 ? 0 : 1; });
Sign in to make a reply
Jemair丶