en.javascript.info/1-js/02-first-steps/04-variables/3-uppercast-constant/solution.md
Ilya Kantor 9ad9063d00 up
2016-11-28 21:35:42 +03:00

5 lines
No EOL
547 B
Markdown

We generally use upper case for constants that are "hard-coded". Or, in other words, when the value is known prior to execution and directly written into the code.
In this code, `birthday` is exactly like that. So we could use the upper case for it.
In contrast, `age` is evaluated in run-time. Today we have one age, a year after we'll have another one. It is constant in a sense that it does not change through the code execution. But it is a bit "less of a constant" than `birthday`, it is calculated, so we should keep the lower case for it.