DEV Community

Discussion on: var, let & const in JavaScript

Collapse
 
kunalt96 profile image
Kunal Tiwari

Yes, that what I wrote above. Yes, let has block scope and var has functional scope. You are mixing two things here and that is what confusing you. Whenever any variables declared outside function, outside blocks in globally - either be let or var, it will have full global scope

Collapse
 
lakshayne profile image
Lakshay Sharma

ok than you very much 👍👍

Thread Thread
 
kunalt96 profile image
Kunal Tiwari

Always welcome buddy :)