+ 1
How to use For in, If in ?
Could you please tell me how to use For in and If in with Javascript ? How does it work and when is do we use it ?
2 Antworten
+ 1
for(var count = 0; count <= 3; count++){
console.log(count)
/*
the output is:
0
1
2
3
*/
}
var x = 0
if(x > 0){
console.log("greater than 0")
}else{
console.log("less or equal to 0")
}
0
that’s not what I meant. I’m not asking the for loop neither the if statement, but « for in » and « If in »