var, let, const - How to declare a variable in JavaScript - Part 2 | JS for Beginners Ep. 5

preview_player
Показать описание
This JavaScript beginner tutorial looks deeper into the keywords var, let and const, which are used to declare JavaScript variables. The focus and examples in this video hover around best practices to better organize code (or scripts), by having variable declarations and initialization in a single line where possible.

When using var and let in JavaScript, simple variable declarations are acceptable. However, when using const to declare constants in JavaScript, there should always be an initializer. In other words, JavaScript constants must always be initialized, as declaration alone will trigger error messages.

Рекомендации по теме
welcome to shbcf.ru