return arr.filter(function(s) { var max = s; if (s <= 1) return false; for (var i = 2; i <= Math.abs(Math.sqrt(max)); i++) { if (s % i == 0 ) return false; } return true; });
Sign in to make a reply
腾腾2318