How does block scoping work with javascript variables

preview_player
Показать описание
A lesson in block scope in javascript

My VSCode Extensions:
- theme: material community high contrast
- fonts: Menlo, Monaco, 'Courier New', monospace
- errors: Error Lens
- extra git help: Git Lens
- tailwind css intellisense
- indent rainbow
- material icon theme
- prettier & eslint
- ES7+ React Snippets

------------

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

"if you still use var for some reason"
Yo I felt that 😭😂

ghosttheprogram
Автор

Your videos are so good.
It helping me so much

zyada
Автор

My version of the “use const instead of var” rule is “use ts instead of js”

bob_kazamakis
Автор

I'm little confuse, If I use function and declare variable using var, then why it's not accessible outside function.

virajjoshi
Автор

You can also declare them without the "const, let or var" keyword, then they will become global variables instead :)

gurgen
Автор

yo what theme are you using? looks really good 😍

mhiaog
Автор

What about just `something = 4`? Seems like languages are overcomplicating things.

dakunskye
Автор

How to make loop or foreach this code
[{pagination: 12345}]
Need to print lik
Page 1, Page 2
How to make it happen plz make a video
Need to fix it plzzz

munsarabuukar
Автор

What extension are you using that puts the lint messages typed out instead of the red line under the error

logandallalio
Автор

hey, how do you get the strike through?? 😮

boluaygepong
Автор

is there ever really an instance when you need to declare a variable that shouldn’t be block scoped?

prestonmatson
Автор

What if I don't say anything? I mean like just "name = `wdj`"

farhanaditya
Автор

I love JavaScript, but it is a fucking semantic mess.

LordMarcus
Автор

Is this quokka? How do you get this nice inline errors?

peterkrau
Автор

and then rest of devs rage at me for using let where shouldnt use var, and my code runs allot faster and better lol.... then gets called into hr for writing better code.... much wow....

shadowpony