+ 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 ?

22nd Nov 2018, 6:01 PM
Andrea Vinci
Andrea Vinci - avatar
2 Réponses
+ 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") }
22nd Nov 2018, 8:14 PM
Etabeta1🇮🇹
Etabeta1🇮🇹 - avatar
0
that’s not what I meant. I’m not asking the for loop neither the if statement, but « for in » and « If in »
23rd Nov 2018, 9:26 AM
Andrea Vinci
Andrea Vinci - avatar