In JavaScript, you can assign to variables or properties. It is a syntax error
to assign to something different, such as the result of a function call or the
result of math:
To fix this error, assign to a variable or property instead, or call a method to
do the assignment:
Alternatively, write == or === instead of =, changing the assignment into
a comparison: