This page lists literals. I presume it's exhaustive (displays all possible literals).
It lists: string literals ("str"|'str'
); template literals; numeric literals i.e. 5
; boolean literals i.e. true
; null
literal; array literals ([1, 2]
) and object literals ({num: 5}
).
Why are undefined
and function declaration/expressions not literals?
Edit: I now know that literals are in contrast to variables and can sometimes be used to assign variables which is why function expressions and not function declarations are considered literals.