Why Programmers use const when declaring variables in Javascript?

Publié le: 21 avril 2019
sur la chaîne: 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


Sur cette page du site, vous pouvez voir la vidéo en ligne Why Programmers use const when declaring variables in Javascript? durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Hussein Nasser 21 avril 2019, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 808 fois et il a aimé 39 téléspectateurs. Bon visionnage!