In this blog, let's start from the bare basics to all the way getting comfortable with understanding scopes in Javascript ❤️ .
So first and foremo...
For further actions, you may consider blocking this person and/or reporting abuse
It seems to me that as soon as var is used, the JavaScript runtime interprets the variable and sets undefined by default until it is assigned
This happens because of a concept called Hoisting in JavaScript. JavaScript checks through all var variables in the script and kind of lifts them to the top of the script making them available , but undefined until they are assigned . Try the same with let and const and it won’t work because let and const variables cant be used before they are defined . This is also called as a temporal dead zone . Hope you got it :)