Reserved JavaScript Words


Reserved JavaScript Words

In the following table, you'll find a list of all the reserved JavaScript terms. This means they can't be used as JavaScript variables or object names or as part of a function or method in JavaScript.

    abstract

    else

    instanceof

   switch

   switch

    enum

   int

   synchronized

    break

    export

    interface

    this

   byte

   extends

    long

    throw

    case

    false

   native

   throws

    catch

   final

   new

    transient

   char

    finally

    null

    true

   class

    float

   package

    try

   const

   for

   private

   typeof

    continue

   function

    protected

    var

    debugger

    goto

    public

    void

    default

   if

   return

   volatile

    delete

   implements

    short

    while

    do

    import

    static

   with

   double

    in

    super

Example:

<html> <body> <h2>Knowledge2life</h2> <p id="demo"></p> <script> const fruits = ["Knowledge2life 1", "Knowledge2life 2", "Knowledge2life 3"]; document.getElementById("demo").innerHTML = fruits.reverse(); </script> </body> </html>

OUTPUT:

Knowledge2life

Knowledge2life 3,Knowledge2life 2,Knowledge2life 1