July 2012
Intermediate to advanced
976 pages
25h 7m
English
All languages, including JavaScript, have numerous reserved words that cannot be used as variable names, function names, or any other form of identifiers without causing some problem. If one of these reserved words is used as a user-defined identifier, such as a variable or function name, it should result in a syntax error. For example, the following declares a variable called for, which, as you have seen, is a JavaScript keyword used for looping:
![]()
You should expect some form of error to occur if you misuse the reserved identifier:
Generally speaking, reserved words are reserved from use because they already have ...
Read now
Unlock full access