Basic And Variables - Study Mode

[#11] The property of a primary expression is
Correct Answer

(A) stand-alone expressions

Explanation

Solution: The simplest expressions, known as primary expressions, are those that stand alone — they do not include any simpler expressions. Primary expressions in JavaScript are constant or literal values, certain laguage keywords, and variable references.

[#12] The JavaScript’s syntax calling ( or executing ) a function or method is called
Correct Answer

(C) Invocation expression

Explanation

Solution: An invocation expression is JavaScript’s syntax for calling (or executing) a function or method) It starts with a function expression that identifies the function to be called.

[#13] What kind of an expression is “new Point(2,3)”?
Correct Answer

(B) Object Creation Expression

Explanation

Solution: An object creation expression creates a new object and invokes a function (called a constructor) to initialize the properties of that object. Object creation expressions are like invocation expressions except that they are prefixed with the keyword new.

[#14] Which of the operator is used to test if a particular property exists or not?
Correct Answer

(A) in

Explanation

Solution: The operator “in” tests whether a particular property exists.

[#15] Among the following, which one is a ternary operator?
Correct Answer

(D) ?:

Explanation

Solution: A ternary operator is a conditional operator that takes three operands. In JavaScript, ?: is the ternary operator. It is used for conditional expressions. The syntax is condition ? expr1 : expr2 . Options + , : , and - are not ternary operators.