Best exact ,to the point,explanation. Beautiful.
tl;dr
let - local variables that can be changed
var - global variables that can be changed
const - constant variables that cannot be changed
crisp and clear,covered everything needed less than 4mins.THANKS
Thank you for keeping it short and to the point.
go beau! go beau! I love this guy!
In less than 4 minutes you explained to me in an easily understandable manner what 30 minute videos and several pages of documentation couldn't get through my skull. Thank you!
Thank you once again Beau for clarifying.
Thank you for making this 80 times easier than Codeacademy lol
Guys what do you think I should do : keep learning JS or start working as a content manager for a company?
Does this mean we don't need to change or "increment" _i_ anymore? We can use _let_ in loops, and have all of them be _i = foo,_ _i < bar,_ _i++?_
Everything is clear to me now. Thanks for explaining the difference between const, let and var.
Very helpful. Thank you!
ok the var and const is easy thing to remember when first learn, so the let key point is scoop right?
Thanks a lot dude..
Clear explanations, thanks for sharing!
Many thanks! Much clearer now!
you can push to a const variable thats important (:
On point thankyou :)
without explanation on hoisting, it is not clear why 'var' variable is already available even before it is defined.
It actually is. The JS engine 'hoists' a variable assigned with the var keyword out of the flow before it starts executing synchronously.
That helped a great deal thanks.
for(var i=1;i
Thank you!!!!!!!!!!!!!!!!!!!!!
I just use var, closures, and caps to indicate constants. I'll use const and let in 5 years once I don't need to depend on a compiler to interpret them.
Some people think you should never use var. I wouldn't go that far, though. 😃 medium.com/javascript-scene/javascript-es6-var-let-or-const-ba58b8dcde75#.sn9gfcmp6
what is the name of this complier ?
var also binds itself to window object, but let and const dont do that
thanks bro
And if you use for(i = 0; i < 3; i++) without assigning neither let nor var keyword, the i becomes global variable.
let: block-lvl VARs - values can be changed
const: values never change
var: srsly u don need an explaination for dis:)
good explanation
Thanks
This guy makes you think you're watching this video at 1.5x speed
Bro ...what are the basic things are known in js
Based.
If we used code for hack, is that counting as for good, hack++ :D
did you know that semicolons are optional? Why bother then?
I’m new but it’s because sometimes they are required so it’s a good habbit to just use them even if they arnt
Also most other C based languages do require them, so it's a good habit to get into if you ever end up moving to other languages 👍
@@chexitout I disagree.
We should do our best to use the language syntax and idioms.
Ur voice is weird
should you use let instead of var when you can or does it not really matter?
should you use let instead of var when you can or does it not really matter?
This is how you explain it, idk what's up with this 20 min vidoes, let vs var vs const
Sometimes it seems like ppl do philosophy...
Yeah, we are missing scope a little bit in depth here, what happens when its inside a function as CONST? and as Var? inside an if statement? etc...
check mmtuts video on this. The best!
jesus christ, no kidding. it was hell trying to find this beautiful explanation, i literally only needed to hear the first minute of it to understand.