Can someone please give me guidance on getting the primenumbers here? This is homework so I don\'t want the answer but some pointers would be greatly appreciated. It\'s real
There is a function that will return true if the number is prime and false if it is not:
function isPrime(x){ d = x-1; while (d > 1){ if ((x % d) == 0) return false; d--; } return true; }
Checkout the demo: http://jsbin.com/velapabedi/1/
JS Bin