4. Expressions and operators
JavaScript primitive expressions contain constants or direct quantities, keywords, and variables
Initialization expressions for objects and arrays
var matrix = [[1,2,3],[4,5,6],[7,8,9]]; var p = {x:2.4,y:1.2};
function definition expression defines a JavaScript function
var function (x) {return x * x;}
Property-Access Expression
Expression.identifierexpression[expression]
A call expression in JavaScript is a syntax hint that invokes (or executes) a function or method
An object creation expression creates an object and invokes a function called a constructor that initializes the properties of the new object
In operator
The in operator wants its left operand to be a string or can be converted to a string, hoping that its right operand is an object
The expression returns true if the object on the right has a property value named left operand value.
instanceof operator
The instanceof operator expects the left operand to be an object, and the right operand identifies the class of the object
If the object on the left is an instance of the right-hand class, the expression returns true, otherwise false is returned.
JavaScript Definitive Guide (sixth Edition)--Chapter 4th