What does this symbol mean in JavaScript?

  1. Home
  2. javascript
  3. 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

First answer

MDN reference on operators

The List

==, === Equality Operators


!=, !== Inequality Operators


&&, ||, ! 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: $, {{#bodyData}}amp;,
C:\Users\Administrator\Desktop\html\k(279).html

,
, $n


{key: value} Object literal syntax:


Destructuring:


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

Second answer

Third answer

Reprint:https://stackoverflow.com/questions/9549780/what-does-this-symbol-mean-in-javascript
Spread the love

Related articles

Comments are closed.