JavaScript reserved keywords are special words reserved by the language and cannot be used as variable, function, or class names. These words are part of the JavaScript specification and are kept reserved to support current features and future language updates.


What Are Reserved Keywords in JavaScript?

Reserved keywords are words that have a fixed meaning in JavaScript or are reserved for future use. Using them as identifiers will cause syntax errors or unexpected behavior.


Currently Used JavaScript Keywords (Reserved)

KeywordCategorySimple Meaning
breakControl FlowStops loop or switch
caseControl FlowMatches case in switch
catchError HandlingHandles errors
classOOPDefines a class
constVariableDeclares constant reference
continueLoop ControlSkips current iteration
debuggerDebuggingPauses execution
defaultControl FlowRuns when no case matches
deleteOperatorDeletes object property
doLoopRuns loop at least once
elseControl FlowRuns when condition is false
exportModulesExports module
extendsOOPInherits class
finallyError HandlingAlways runs
forLoopLoop with counter
functionFunctionsDeclares function
ifControl FlowRuns when condition is true
importModulesImports module
inOperatorChecks property in object
instanceofOperatorChecks object type
letVariableBlock-scoped variable
newObjectsCreates new object
returnFunctionsReturns value
superOOPCalls parent constructor
switchControl FlowSelects case
thisObjectsRefers to current object
throwError HandlingThrows error
tryError HandlingWraps risky code
typeofOperatorReturns data type
varVariableFunction-scoped variable
voidOperatorReturns undefined
whileLoopRuns while condition is true
withDeprecatedAvoid using
yieldGeneratorsPauses generator

Future Reserved Keywords (Cannot Be Used)

Keyword
abstract
boolean
byte
char
double
final
float
goto
int
long
native
short
synchronized
throws
transient
volatile

Strict Mode Reserved Keywords

Keyword
implements
interface
package
private
protected
public
static

Keywords That Look Like Values (Also Reserved)

KeywordMeaning
nullRepresents no value
trueBoolean true
falseBoolean false

Summary

JavaScript reserved keywords are protected by the language and cannot be used as identifiers. These keywords define core language features, control program flow, manage objects, handle errors, and support modules and asynchronous programming. Understanding reserved keywords helps avoid syntax errors and improves code readability and correctness.