What do you call this in JavaScript?
This is a list of ambiguous symbols used in JavaScript that may be confusing to search for on the web.
Symbols in JavaScript
Symbol | Description | Colloquial verbiage |
---|---|---|
=> |
Arrow function expression | "Hash rocket", "fat arrow" |
=== |
Strict equality comparison | "Threequal", "identity" |
== |
Abstract equality comparison | "Loose equality" |
{ ...object } |
Object spread operator | "Splat" |
function fn(...args) |
Rest parameters | "Stargs" |
const { a, b } = ... |
Destructuring assignment | |
{ [name]: "..." } |
Computed property names | |
++ |
Increment operator | |
-- |
Decrement operator | |
** |
Exponentiation operator | |
-a |
Unary negation operator | |
+a |
Unary plus operator |
Symbols in TC39 proposals
Some features that may not be available in mainstream JavaScript yet.
Symbol | Description | Colloquial verbiage |
---|---|---|
?? |
Nullish coalescing | |
?. |
Optional chaining | "Safe navigation operator" (Groovy), "Elvis operator", "Lonely operator" (Ruby) |
@foo() |
Class decorators | |
#method |
Private fields | |
#{...} |
Record (immutable) | |
#[...] |
Tuple (immutable) |
Thanks
Inspired by JuanitoFatas/what-do-you-call-this-in-ruby.