While and for


#1

My for loop logs numbers 0 - 100 in increments of 5 as I had wanted.
My while loop however outputs 0 - 10 but with 10 twice, why does it do that?
Not really an issue just wondering what I did wrong or why it works that way

0,1,2,3,4,5,6,7,8,9,10,10


for (var i=0; i<101; i+=5){
console.log(i)
}

var count = 0
while (count<11){
console.log(count);
count++
}


#2

A console feature that echoes the last value in your code unless it is undefined. So you're seeing the value of count++.