Var vs Const vs Let (ES6) - Beau teaches JavaScript

preview_player
Показать описание
Learn about the difference between const, var, and let in JavaScript ES6 (ECMAScript 6).

Code

Other resources on topic:

⭐JavaScript Playlists⭐

-
We're busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.

Рекомендации по теме
Комментарии
Автор

This is how you explain it, idk what's up with this 20 min vidoes, let vs var vs const

ylioo
Автор

Best exact, to the point, explanation. Beautiful.

abhinavkumar
Автор

tl;dr
let - local variables that can be changed
var - global variables that can be changed
const - constant variables that cannot be changed

_runic
Автор

crisp and clear, covered everything needed less than 4mins.THANKS

pratikpokharel
Автор

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!

rayjaymor
Автор

Thank you for keeping it short and to the point.

mikestuff
Автор

Thank you once again Beau for clarifying.

aceborja
Автор

Thank you for making this 80 times easier than Codeacademy lol

antsanders
Автор

Everything is clear to me now. Thanks for explaining the difference between const, let and var.

Mikael
Автор

Clear explanations, thanks for sharing!

theonewhodoesPoland
Автор

This guy makes you think you're watching this video at 1.5x speed

stevenshelby
Автор

Guys what do you think I should do : keep learning JS or start working as a content manager for a company?

mirataoskoi
Автор

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++?_

batfan
Автор

you can push to a const variable thats important (:

yanivsalman
Автор

ok the var and const is easy thing to remember when first learn, so the let key point is scoop right?

moza
Автор

let: block-lvl VARs - values can be changed
const: values never change
var: srsly u don need an explaination for dis:)

aybakk
Автор

for(var i=1;i<=5;i++)
{
setTimeout(function(){ console.log(i) }, 1000);
}

Why does it give o/p *6* ?
It should give
1
2
3
4
5
...but it isnt, , whyy ??..
Plz give me an explanation related to hoisting

sayantaniguha
Автор

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.

trappedcat
Автор

without explanation on hoisting, it is not clear why 'var' variable is already available even before it is defined.

hyunchae
Автор

And if you use for(i = 0; i < 3; i++) without assigning neither let nor var keyword, the i becomes global variable.

sandiladhikari