Time:10-10
CodePudding user response:
https://blog.csdn.net/qq_42720683/article/details/82106964
var arr=[]; For (var I=2; i<100; I++) {Var cont=0; for(var j=1; j<=I; J++) {If (I % j==0) {Cont++; } } If (cont==2) {Arr. Push (I); } } Alert (arr); I am a newcomer wrong please forgive me; Change your for loop and var x to delete to write I try; The inner HTML=x, with inner. HTML=arr. Join (", ");
prime Numbers of 2 to 100
Page link:https//www.codepudding.com/frontend/61122.html