Skip to content

Keywords

KeywordJS OutputDescription
constconstConstant declaration
letletVariable declaration
varvarVar declaration (discouraged)
be=Assignment
KeywordJS OutputDescription
fnfunctionFunction declaration/expression
returnreturnReturn value
to=> exprExpression body
to return{ return expr; }Explicit return expression body
gives(erased)Return type annotation
asyncasyncAsync function
awaitawaitAwait expression
KeywordJS OutputDescription
ififConditional
elifelse ifElse-if branch
elseelseElse branch
unlessif (!(...))Negated conditional
then(ternary/inline)Inline conditional
KeywordJS OutputDescription
whilewhileWhile loop
untilwhile (!(...))Negated while loop
forforFor loop
inof / inIterator
range(numeric range)Range-based loop
breakbreakBreak
continuecontinueContinue
KeywordJS OutputDescription
switchif-else chainSwitch expression
case(switch arm)Switch case
default(switch default)Default arm
matchif-else chainMatch expression (deprecated)
when(match arm)Match case (deprecated)
KeywordJS OutputDescription
importimportESM import
fromfromImport source
exportexportESM export
defaultdefaultDefault export
requirerequire()CJS require
useimportDot-path import (deprecated)
namespaceIIFEModule namespace
publicexportPublic export
all* asNamespace import
withwithImport attributes
KeywordJS Output
add+
sub-
mul*
div/
mod%
pow**
neg- (unary)
KeywordJS Output
eq===
neq / not eq!==
lt<
gt>
le / lt eq<=
ge / gt eq>=
KeywordJS Output
and&&
or||
not!
KeywordJS Output
coal??
KeywordJS Output
pipeb(a)
KeywordJS OutputDescription
is===Equality check (alias of eq)
as(erased)Type cast
of(erased)Type annotation
typeoftypeofTypeof operator
instanceofinstanceofInstance check
type(erased)Type alias
KeywordJS Output
newnew
deletedelete
thisthis
supersuper
throwthrow
trytry
catchcatch
finallyfinally
pipepipeline operator
listarray literal
objectobject literal
nanNaN
KeywordJS OutputDescription
classclassClass declaration
extendsextendsClass inheritance
supersuperParent class reference
staticstaticStatic method
private#fieldPrivate field declaration
getgetGetter accessor
setsetSetter accessor
SymbolMeaning
[ ]Brackets (calls, arrays, objects, grouping)
.Property access
\.Optional chaining (?.)
\Computed access prefix (inside [...])
;Argument / element separator
,Array / object separator
..Inclusive range
...Exclusive range