JavaScript Tips & Tricks #2: 12 Ways to Create Variables in JavaScript

preview_player
Показать описание
⭕ Overview
In this video, I'll show you how to create variables in JavaScript using 12 different ways. Chances are you will probably never use most of them in your code, but for the love of coding and because JavaScript lets you do it, we'll explore its capabilities.

⭕ Chapters
0:00 - Introduction
1:36 - #1. Using let
1:58 - #2. Using const
2:22- #3. Using var
2:42 - #4. Using no keyword (globally)
3:03 - #5. Using globalThis keyword
3:30 - #6. Using this keyword
3:50 - #7. Using window keyword
4:10 - #8. Using window's constructor's prototype property
4:50 - #9. Using this constructor's prototype property
5:21 - #10. Using this constructor's prototype property
5:51 - #11. Using object instance __proto__
6:55 - #12. Using object literal __proto__
8:02 - Conclusion

⭕ About me

⭕ My complete online training courses:

⭕ Check out my book:
Developing Business Applications for the Web: With HTML, CSS, JSP, PHP, ASP.NET, and JavaScript is available on Amazon and MC Press.
Рекомендации по теме
Комментарии
Автор

This video is great! You don't need the fancy transitions. They are too frequent and honestly, you don't need that at all.

adamakomou
Автор

You can also create a variable using the *self* which is also an alias to the global *this* value.

self.city = "My City"
console.log(city);

ChristianHur