Shaz
Shaz

Reputation: 15867

What reserved words are actually used?

There are many reserved words in JavaScript, but how many are actually being used in the language?

     const  for private  typeof  continue 
     catch  final new  transient function
    abstract   else  instanceof switch
               synchronized
                  boolean
                   enum
                    int
                   break
                    var
                   export
                  interface         debugger goto public
                    this            void
                    byte            default 
                  protected         if
                   extends          return
                    long            volatile
                   throw            delete implements short
 continue           case                              while
  native           false                              import
  class            throws                             do
  char package float  try                             static
  finally null true const           double in  super  with 

For the ones that haven't been used before, have newer versions (say 1.5+) of JavaScript taken advantage (or plan to take advantage) of any of these?

Upvotes: 0

Views: 120

Answers (1)

David Titarenco
David Titarenco

Reputation: 33396

Check out https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words.

Also, I don't see some of your words on http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf

Look at page 211, there is no volatile, for example:

-- Keyword :
break
do
instanceof
typeof
case
else
new
var
catch
finally
return
void
continue
for
switch
while
debugger
function
this
with
default
if
throw
delete
in
try

-- FutureReservedWord :
class
enum
extends
super
const
export
import

-- Strict Mode :
implements
let
private
public
interface
package
protected
static
yield  

Upvotes: 2

Related Questions