Skip to content

Keywords

KeywordJS OutputDescription
constconstConstant declaration
letletVariable declaration
varvarVar declaration (discouraged)
be=Assignment / reassignment (must be preceded by const, let, var, or a property/index target)
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
yieldyieldYield expression (generator)
function(deprecated)Deprecated alias for fn
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
dodoDo-while loop (deprecated)
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
use(inline JS)Standard library import (p- prefix, as optional)
namespaceIIFEModule namespace
publicexportPublic export
all* asNamespace import
withwithImport attributes
KeywordJS Output
add+
sub-
mul*
div/
mod%
pow**
neg- (unary)
KeywordJS Output
add be+=
sub be-=
mul be*=
div be/=
mod be%=
pow be**=
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
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
infinityInfinity (neg infinity / -infinity-Infinity)
KeywordJS OutputDescription
classclassClass declaration
extendsextendsClass inheritance
supersuperParent class reference
staticstaticStatic method
private#fieldPrivate field declaration
protected(deprecated)Deprecated alias for private
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