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
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
matchif-else chainMatch expression
when(match arm)Match case
KeywordJS OutputDescription
importimportESM import
fromfromImport source
exportexportESM export
defaultdefaultDefault export
requirerequire()CJS require
useimportDot-path import
modIIFEModule namespace
pubexportPublic export
all* asNamespace import
KeywordJS Output
add+
sub-
mul*
div/
mod%
neg- (unary)
KeywordJS Output
eq===
ne!==
lt<
gt>
le<=
ge>=
KeywordJS Output
and&&
or||
not!
KeywordJS Output
pipeb(a)
KeywordJS OutputDescription
istypeof / instanceofType check
as(erased)Type cast
of(erased)Type annotation
typeoftypeofTypeof operator
instanceofinstanceofInstance check
type(erased)Type alias
KeywordJS Output
newnew
deletedelete
thisthis
throwthrow
trytry
catchcatch
finallyfinally
pipepipeline operator
listarray literal
objectobject literal