Read more about let
: https://developer.mozilla.org/en-US/
docs/Web/JavaScript/Reference/Statements/let
Read more about const
: https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Reference/Statements/const
let
and const
basically replace var
. You use let
instead of var
and const
instead of var
if you plan on never re-assigning this "variable" effectively turning it into a constant therefore).
- Working with variables: https://javascript.info/task/hello-variables
- Giving the right name:: https://javascript.info/task/declare-variables
- Uppercase const?: https://javascript.info/task/uppercast-constant
- Use the Rest Parameter with Function Parameters
- Explore Differences Between the var and let Keywords
- Compare Scopes of the var and let Keywords
- Declare a Read-Only Variable with the const Keyword
- Mutate an Array Declared with const
- Prevent Object Mutation