Level 72 Level 74
Level 73

[Quiz] Operators

24 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

What is an expression?
A phrase that can be evaluated to produce a value
What is an operator?
An operator combines the value of its operands in some way and evaluates to a new value
What is a primary expression?
Constant or literal values (elements embedded directly into the program such as a number or string), certain language keywords (reserved, etc) and variable references (i, sum, undefined, etc.)
Is the keyword "this" a primary expression?
No, because it evaluates to different values in different places in the program.
What is an object or array initializer?
Expressions whose value is a newly created object or array. The value of a newly created array is an array initializer. Element expressions can also be initializers.
Are array and object initializers also primary expressions?
No because they also include a number of sub-expressions that specify property and element values.
what is a function definition expression?
defines a JS function and the value of such an expression is the newly defined function
What is a property access expression?
the expression evaluates to the value of an object property or an array element. Two types: . and bracket notation.
Bracket notation.
What type of property access expression can be used for numbers, punctuation, and reserved words within the property name?
Because those JS values cannot include properties.
Why does using the property access on null or undefined return undefined?
What is an invocation expression?
An invocation expression is JS's syntax for calling or executing a function or a method.
What is a method invocation?
When an invocation expression is a property access expression.
What is an object creation expression?
An expression that creates a new object and invokes a function to initialize the properties of that object. Object creation expressions are like invocation expressions except they are prefixed with the keyword new.
What is a binary operator?
An operator that combines two expressions into a single, more complex expression.
what is a unary operator?
Operator that coverts a single expression into a single, more complex expression (such as ++ or +=)
What is the one ternary operator that JS supports?
the conditional operator ?: which combines three expressions into a single expression.
what is an lvalue?
A value that can be legally displayed on the lefthand side of an equation such as variables, properties of objects, and elements of arrays.
What does operator precedence do?
Control the order in which operations are performed
How can operator precedence be overriden?
With parenthesis. Note: property access and invocation expressions have higher precedence than any of the other operators.
How does the addition operator function?
If an operand is an object, it coverts it to a primitive. Then, if either operand is a string, the other is converted to a string and concatenated. Otherwise, both operands are converted to numbers and addition is performed.
var i = 1; j = i++;
// i and j are both 2
what are relational operators?
Operators test for a relationship ("equals" "less than" "property of") between two values before returning true or false depending on whether the relationship exists.
If both values are NaN, are they equal?
No, NaN is never equal to any other value, including itself.
What is the instance Of operator?
The operator evaluates to true if the left hand expression is an instanceOf the right hand side expression.