JavaScript Variable Scopes Demystified - var, let, and const

Veröffentlicht am: 19 Januar 2023
auf dem Kanal: Andrew Connell
425
14

Traditionally every JavaScript developer used `var` to declare variables. In ES6, they added the `let` and `const` keywords to declare variables. Each of these keywords provides a different "scope" for the variable they're declaring and that can make a big difference in your code in both positive and negative ways depending on your expectations. In this episode of Browser Native, we'll dive deep into how to use these keywords, what they're good for, and what are some of the pros and cons.


🔗 Links
------------------------------------------------
🔗 Browser Native series - https://vtns.io/browser-native
🔗 global scope - https://officedev.github.io/browser-n...
🔗 function scope - https://officedev.github.io/browser-n...
🔗 block scope - https://officedev.github.io/browser-n...
🔗 W3Schools - JS Let: https://www.w3schools.com/js/js_let.asp
🔗 W3Schools - JS Const: https://www.w3schools.com/js/js_const...


📚 Chapters
------------------------------------------------
00:00 : Introduction
00:11 : Var, Let, & Const - differences
05:34 : Global variable scope
06:37 : Function variable scope
08:15 : Block variable scope

#BrowserNative #JavaScript


Auf dieser Seite können Sie das Online-Video JavaScript Variable Scopes Demystified - var, let, and const mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Andrew Connell 19 Januar 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 425 Mal angesehen und es wurde von 14 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!