return arr.filter(function(s){ if(s==1){ return false; }else if(s==2){ return true; } for(let i=2;i<=Math.sqrt(s);i++){ if(s%i==0) return false; } return true; });
Sign in to make a reply
NotFatCat