This chapter documents many of the JavaScript language operators, expressions and keywords.
For an alphabetical listing see the sidebar on the left.
Basic keywords and general expressions in JavaScript.
functionfunction keyword defines a function expression.[]{}/ab+c/i( )Left values are the destination of an assignment.
Property accessorsobject.property and object["property"]).newnew operator creates an instance of a constructor.Postfix/prefix increment and postfix/prefix decrement operators.
A++A--++A--AA unary operation is operation with only one operand.
deletedelete operator deletes a property from an object.voidvoid operator discards an expression's return value.typeoftypeof operator determines the type of a given object.+-~!Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value.
+-/*%A comparison operator compares its operands and returns a Boolean value based on whether the comparison is true.
inin operator determines whether an object has a given property.instanceofinstanceof operator determines whether an object is an instance of another object.<><=>=The result of evaluating an equality operator is always of type Boolean based on whether the comparison is true.
Operations to shift all bits of the operand.
<<>>>>>Bitwise operators treat their operands as a set of 32 bits (zeros and ones) and return standard JavaScript numerical values.
Logical operators are typically used with boolean (logical) values, and when they are, they return a boolean value.
(condition ? ifTrue : ifFalse)The conditional operator returns one of two values based on the logical value of the condition.
An assignment operator assigns a value to its left operand based on the value of its right operand.
=*=/=%=+=-=<<=>>=>>>=&=^=|=,Created by Mozilla Contributors and licensed under CC-BY-SA 2.5