Expressions An expression is a unit of code that evaluates to a value. Arithmetic OperatorsA collection of operators enabling basic arithmetic such as addition and subtraction. Array LiteralCreates an array (ordered lists of elements) and, optionally, populates it with elements. Assignment OperatorsAssignment operators enable modification of variables. Bitwise OperatorsBitwise operations operate on the individual bits of numbers in their binary formats. Character LiteralCreates a character value. Comma OperatorEvaluates a series of expressions and returns the value of the last evaluated expression. Comparison OperatorsComparison operators are used for comparing the values of two expressions. Concatenation Operator (+)Joins two strings. Conditional (Ternary) OperatorEvaluates expressions conditionally. Decrement (--)Decreases the value of a variable by one (1). deleteRemoves a property or method from a JavaScript object. falseBoolean value for false. Function Call ExpressionCalls a function with the specified arguments. Function ExpressionDefines a function inside an expression. Grouping ExpressionOverrides precedence of operations. inChecks if an object/container has a property or if an index is in an array. Increment (++)Increases the value of a variable by one (1). instanceofFor internal types, instanceof determines if an object is compatible with a specified type or one of its ancestors. For external types, instanceof determines if one object is in the prototype chain of another. Key-Value Container LiteralCreates a dictionary, map ("associative array"), or external JavaScript object and optionally populates it with key-value pairs. Logical OperatorsThe logical operators are the logical && (AND) operator, the logical || (OR) operator, and the logical ! (NOT) operator. They are often used in conditionals such as if statements to combine and negate conditions. newInstantiates a class. nullA value intentionally indicating no value for the data. Numeric Literals and SuffixesCreates a numeric value. Object LiteralInitialize a JavaScript object using object literal notation, and, optionally, the properties of the object may be specified at creation. Regular Expression LiteralCreates a regular expression value. Safe Default (??) OperatorEvalutes the left-hand side. If the result is not null or undefined, it is returned. Otherwise, the evaluated value of the right-hand side is returned. Safe Navigation (?.) OperatorGets the class member if the object (left-hand side) is not null. Set LiteralCreates a set or unordered set and, optionally, populates it with values. String LiteralA sequence of characters, enclosed in quotes, for representing textual data. super'super' refers to the base class instance. The 'super' keyword can also be used to invoke a class constructor or access non-static members of a base class. thisIn JS++, 'this' refers to the current instance of a class. The 'this' keyword can also be used to invoke a class constructor or access instance members of a class. For JavaScript code, the 'this' keyword has varying semantics depending on the context in which it is used. trueBoolean value for true. Type Cast OperatorCast an expression to a specific type. typeidReturns the type of an expression at runtime. typeofReturns the type of an expression at runtime. This operator is deprecated. Use typeid instead. Unary Negation (-)Converts an expression to an int and negates its integer value. Unary Plus (+)Converts an expression to an int. undefinedThe value returned by JS++ for out-of-bounds accesses for internal types, and the value returned when no value has been assigned for external types. Share HTML | BBCode | Direct Link