+ 5

Var name confusing

https://code.sololearn.com/W4V63evL0tKr/?ref=app In the code the var/let keywords is not there but not showing an error?

28th Oct 2020, 6:28 PM
Kashyap Kumar
Kashyap Kumar - avatar
1 Odpowiedź
+ 5
You might get a better understanding reading about scopes in javascript your num is currently global anything defined in the block is not visible outside of it so it works ok
28th Oct 2020, 6:52 PM
D_Stark
D_Stark - avatar