How to use For in, If in ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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