Why Programmers use const when declaring variables in Javascript?

Published: 21 April 2019
on channel: Hussein Nasser
808
39

In this video we will learn the benefits of using "const" over "let" and for sure over "var".

const
Cannot reassign it, js engine can make performance discussions based on that

Scoped in blocks

If objects or arrays, const can be modified


Summary
Always use const

if your variable need to be reassigned use let

avoid using var as it attaches itself to the window variable


Stay Awesome!
Hussein


On this page of the site you can watch the video online Why Programmers use const when declaring variables in Javascript? with a duration of hours minute second in good quality, which was uploaded by the user Hussein Nasser 21 April 2019, share the link with friends and acquaintances, this video has already been watched 808 times on youtube and it was liked by 39 viewers. Enjoy your viewing!