Solution Review: "strict" Mode
In this lesson, we will discuss the solutions to the questions in the previous lesson.
We'll cover the following...
We'll cover the following...
For the code above, you had to answer the following question.
Explanation #
Let’s run the code to see what happens.
As you can see, an error is thrown when the code is run; this means Option A is correct. Why do you see an error?
The answer might seem obvious; since, on line 3, when we define the property x, we set its writable property to false; this means it is a read-only property.
On ...