Declaring a Read-Only Variable with const Keyword, freeCodeCamp ES6 Javascript Syntax Introduction

63 views /


In today's lesson in this ES6 introduction, we look at a new keyword. The "const' keyword is often used when we want to declare a variable that will stay constant throughout our code. We learn that when using the "const" keyword for variable declaration, it is a convention to give our variable name, all caps. This helps us distinguish which variables are meant to be constants while variables declared with the "let"' keyword is declared using camel casing.


0 commentaries