Export (0) Print
Expand All

JavaScript Reserved Words

JavaScript has a number of reserved words that you cannot use as identifiers. Reserved words have a specific meaning to the JavaScript language, as they are part of the language syntax. Using a reserved word causes a compilation error when loading your script.

JavaScript also has a list of future reserved words. These words are not currently part of the JavaScript language, although they are reserved for future use.

Reserved Words

break

delete

if

this

while

case

do

in

throw

with

catch

else

instanceof

try

continue

finally

new

typeof

debugger

for

return

var

default

function

switch

void

class

extends

let

public

const

implements

package

static

enum

import

private

super

export

interface

protected

yield

When choosing identifiers it is also important to avoid any words that are already the names of intrinsic JavaScript objects or functions, such as String or parseInt.

Community Additions

Show:
© 2014 Microsoft