I just don't get it why when I use this,
for(in=1; in<=3;in++) {
for(out=1; out<=2; out++) {
console.log('*')
}
}
it prints 6 stars which seems right to me, And when i use it with if/else like this,
for(in=0; in<=3; in++) {
for(out=0; out<=2; out++) {
if(in == 9) {
console.log('inside');
}
}
console.log('outside');
}
(outside) will be printed 4 times I really don't get it why is it like this ?
in=0; in<=3; in++which will loop it 4 times... soousideis printed 4 times....ifstatement, so why shouldn't it be printed every time?