Is it an infinite JS loop?

I wrote the following codes for a Javascript loop with while loop but when I run the codes, I face with an infinite loop which is really disappointing, I tried the same codes in for loop and it was working so good.

var j2 = 1;
while(j2 <= 10){
    if(j2 == 5)
        continue;
    console.log(j2);
    j2++;
}