let & const (Block-Scoped Variables) in JavaScript

preview_player
Показать описание
Introduction
Before ES6 (ECMAScript 2015), JavaScript had only one way to declare variables: var .
However, var had functional scoping issues that led to unpredictable behaviors in certain
cases. To address these problems, ES6 introduced let and const , which provide blocklevel scoping and prevent unintended variable modications.
Рекомендации по теме
welcome to shbcf.ru