June 2018
Beginner
288 pages
6h 31m
English
JavaScript is a very powerful language with some unpleasant surprises. You learned to be careful about automatic insertion of ;, to use === instead of ==, and to declare variables before use. We also discussed a few ways to proactively deal with the gotchas—by using the ’use strict’; directive and lint tools. In the next chapter we will discuss how a very fundamental task of declaring variables has changed, for the better, in JavaScript.
Take a break and practice, using these code exercises, to identify some potential errors in code and ways to improve writing JavaScript. You can find answers to these exerciseshere.
What will be the result of each of the following return statements?
| | return |
| | 2 * 3; |
| | |
| | return 2 ... |
Read now
Unlock full access