Tech Skills

Modern JavaScript – Let, var, Const in ES6+
Daily Updates, Tech Skills

Modern JavaScript – Let, var, Const in ES6+

Over the past few years, there have been many updates to the JavaScript language. And these updates are very useful if you want to improve your coding. Recently, there have been many useful additions to JavaScript like the optional chaining, Nullish coalescing operator, Promises, async/await, ES6 destructuring, and more. So today, we will look at Let and var concepts which every JavaScript developer should be aware of. Let's get started and dive into the things you need to know about JS. Let and var in ES6 JavaScript Before ES6(ECMAScript), JavaScript used the var keyword which only used global and function scope. There was no block-level scope. With the addition of let and const JavaScript added block scoping. let in ES6 JavaScript When we declare a variable using the let ...