GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing developer.mozilla.org — Expressions and operators - JavaScript | MDN Expressions and operatorsThis chapter documents all the JavaScript language operators, expressions and keywords. Expressions and operators by categoryFor an alphabetical listing see the sidebar on the left. Primary expressionsBasic keywords and general expressions in JavaScript. These expressions have the highest precedence (higher than operators).
Left-hand-side expressionsLeft values are the destination of an assignment.
Increment and decrementPostfix/prefix increment and postfix/prefix decrement operators. Unary operatorsA unary operation is an operation with only one operand.
Arithmetic operatorsArithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value. Relational operatorsA comparison operator compares its operands and returns a boolean value based on whether the comparison is true.
Note:
Equality operatorsThe result of evaluating an equality operator is always of type boolean based on whether the comparison is true. Bitwise shift operatorsOperations to shift all bits of the operand. Binary bitwise operatorsBitwise operators treat their operands as a set of 32 bits (zeros and ones) and return standard JavaScript numerical values. Binary logical operatorsLogical operators implement boolean (logical) values and have short-circuiting behavior. Conditional (ternary) operator
Assignment operatorsAn assignment operator assigns a value to its left operand based on the value of its right operand.
Yield operatorsSpread syntax
Comma operator
What are operators?As the What are statements, declarations, and expressions? section explains, an expression is a fundamental building block that evaluates to a value. Statements, declarations, and expressions can all define specific slots where expressions are accepted. Where an expression contains slots for further nested expressions, the part(s) that are not slots are known as operators. For example, the syntax for an addition expression is MDN also regards expressions without slots such as An expression does not need to take a fixed number of slots. For example, the array literal expression, The definition of operators gets fuzzier with certain other code entities: what if an expression has a slot that's not an expression, or a code entity combined with an expression does not make an expression? Do we still refer to that code entity as an operator?
The term "operator" is not precisely defined in JavaScript, so MDN does not give a definitive answer. Our approach is to group all these constructs under "Operators" but avoid formally referring to them as operators. Many useful concepts about operators, such as precedence, still apply to them regardless of their exact nature. SpecificationsBrowser compatibilitySee also |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |