Compare Scopes of the var and let Keywords i dnt understund

Tell us what’s happening:
can anyone help me to understand this lesson and why i returned 3 in the examples

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36.

Link to the challenge:

I watched videos and read articles until one day it made sense. Also doing the exercises in the javascript console in developer tools from the vdeos and articles. Couldn’t tell you which one it was, but it is necessary to have exposure to the subject outside of FCC. Here’s one video:
Here’s a Google Search:…14952.34102…35680…1.0…0.156.1426.17j1…0…1…gws-wiz…0i71j33i10.nKP1AO_Vb7c

Console logging the same var in a function and outside a function helps more than lot’s of video re-watching. Down the road you’ll realize you have experiential knowledge and some insight into debugging.


thanks for helping :slight_smile:

Here are a few more links.

You Don’t Know JS: ES6 & Beyond

1 Like