What does this symbol mean in JavaScript?

What is this?

This is a collection of questions that come up every now and then about syntax in JavaScript. This is also a Community Wiki, so everyone is invited to participate in maintaining this list.

Why is this?

Stack Overflow does not allow searching for particular characters. As a consequence, many questions about operators and other syntax tokens are not found easily when searching for them. This also makes closing duplicates more difficult. The list below is to help with this issue.

The main idea is to have links to existing questions on Stack Overflow, so it's easier for us to reference them, not to copy over content from the ECMAScript Spec.

Additionally, this is a blatant copy of the PHP symbol reference. We needed a JS one.

Please help. Edit and add links to other operators/syntax references, or if you can't find good questions/answers on a particular piece of syntax, add an answer to this question and link it



MDN reference on operators

The List

==, === Equality Operators

!=, !== Inequality Operators

= Assignment Operator

&&, ||, ! Logical Operators

() Grouping Operator

, Comma Operator

?…: Conditional (ternary) Operator

|, &, ^, ~ Bitwise OR, AND, XOR & NOT operators

<<, >>, >>> Bit shift operators

+, - operators

++, -- pre/post-increment/decrement operators

void operator

var x = function() vs function x() Function Declaration Syntax

=> Arrow function expression syntax

(function(){...})() IIFE (Immediately Invoked Function Expression)

someFunction()() Functions which return other functions

[], Array() Array Notation

/.../ - regular expression literals

$ in regex replace patterns: $$, $&, $`, $', $n

{key: value} Object literal syntax:


Optional chaining operator (foo?.bar?.baz):

Nullish coalescing operator (??):

Template literals:

function*, yield, yield* Generator functions:

var, let, const Declaring variables:

this Keyword:

:: Bind operator:

new operator

delete operator

label: Labels

+= Operator

...iter Spread syntax / Rest parameters

|> Operator

** Power Operator


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.