O'Reilly logo

JavaScript The Complete Reference, 3rd Edition by Fritz Schneider, Thomas Powell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

APPENDIXJavaScript Reserved Words

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:

image

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required