May 2018
Intermediate to advanced
376 pages
9h 22m
English
After reading lesson 5, you will
The keyword const stands for constant, as in never changing. Many programs have values that never change, whether by intention or by happenstance. Values declared with const, referred to as constants, have the same characteristics as those declared with let, which you learned about in the previous chapter, with the additional feature of reassignment being forbidden.
Consider the following switch statement, which uses flags to determine what type of action is being performed. The uppercasing of ADD_ITEM and DEL_ITEM indicates that these are values that are never expected ...
Read now
Unlock full access