0
Variable scope
Why my code says (y) is not defined? https://code.sololearn.com/W3oU6AAQ7SXf/?ref=app
5 ответов
+ 4
JS LOVER You have defined variable inside if block using let keyword so you can't access outside the block. But when you use var keyword then you can access
+ 5
JS LOVER let variables are block-scoped.
It's well explained here:
https://www.sololearn.com/learn/JavaScript/2969/
Keep learning the JS tutorial. You are going to reach that lesson soon.
Var vs Let:
https://www.sololearn.com/post/39014/?ref=app
+ 1
coffeeunderrun sorry!
I was facing a bad network connection
+ 1
Thank you guys