I am a rookie. I have a doubt about the following code. The code is as follows:
function showPrimes(n) {
nextPrime: for (let i = 2; i < n; iPP) {
for (let j = 2; j < i; jPP) {
if (i % j == 0) continue nextPrime;
}
alert( i ); // a prime
}
}
the output result is: 2, br 3, 5, 5, 7, < 3 > Why is there no 9?
is there an old driver to explain? thank you!