Help with for/in loop
I am so lost trying to make a program to display 1000 prime numbers using for/in loop with the numbers placed in an array. I would be happy if I could get for/in to display 0 - 1000 right now. Surely my instructor does not want me to type in the first 1000 prime numbers into an array.
var myArray = new Array(i = 0, i <= 1000, i++);
for (i in myArray)
{
document.write(myArray[i]);
}
|