The Power of Javascript: Basic Concepts - Keywords
(Page 4 of 6 )
The English language (or any other thing that we can call a language) is made up of words that have special meaning to the people who speak the language. The same thing applies to Javascript. There is a set of words that is used by the Javascript interpreter; these words have special meaning and are used to perform operations. We call these words keywords or reserved keywords.
To explain what a keyword can do in a script, say we need to declare a memory location. To do so, we need to use the Javascript keyword var (wait until we discuss identifiers, and we will complete it). The following is the list of keywords reserved by the Javascript language. This means that they have been reserved for use by the Javascript language and you can't use them; again you will understand this better as we go on.
| break | case | continue | catch | default |
| delete | do | else | finally | for |
| function | if | in | instanceof | new |
| return | switch | this | throw | try |
| type | var | void | while | with |
So in our example we have var as a keyword. Also, document is considered a keyword, but I will not discuss it now. The following list is another set of keywords that are reserved for Javascript for future use. You can say that they're reserved to add more functionality to the Javascript language.
| abstract | boolean | byte | char | class |
| const | debugger | double | enum | export |
| extends | final | float | goto | implements |
| import | int | interface | long | native |
| package | private | protected | public | short |
| static | super | synchronized | throws | transient |
| volatile | | | | |
Next: Identifiers >>
More JavaScript Articles
More By Michael Youssef