1D0-735 practice question 11 of 15
Which of the following comparison statements will return true?
Full set: 55 questionsThe statement X !== y uses the strict inequality operator. This operator evaluates whether its two operands are not equal, returning a Boolean result. It checks for inequality in both value and type without performing any type coercion. In this case, X is the number 15 and Y is the number 3. Since the value 15 is not equal to the value 3, the expression 15 !== 3 correctly evaluates to true.
A. The == (equality) operator returns false because the value 15 is not equal to the value 3.
B. The operator +== is not a valid assignment or comparison operator in JavaScript and will cause a SyntaxError.
D. The === (strict equality) operator returns false because the value 15 is not equal to the value 3.
1. Mozilla Developer Network (MDN) Web Docs: "The strict inequality operator (!==) checks whether its two operands are not equal, returning a Boolean result. Unlike the inequality operator, the strict inequality operator always considers operands of different types to be different."
Source: MDN Web Docs, Comparison operators, Section: "Strict inequality (!==)".
2. ECMAScript® 2024 Language Specification (ECMA-262, 15th Edition): The specification defines the behavior of the strict inequality operator. The expression x !== y is defined as the logical negation of the Strict Equality Comparison x === y. For two numbers, x === y is true only if they have the same numeric value. Since 15 and 3 do not, 15 === 3 is false, making 15 !== 3 true.
Source: ECMA-262, 15th Edition, June 2024, Section 13.11.4, "Runtime Semantics: Evaluation" for RelationalExpression : RelationalExpression !== ShiftExpression.
3. W3C (used in many university curricula): The JavaScript Comparison and Logical Operators documentation, often referenced in academic settings, explains that !== returns true if the operands are not equal and/or not of the same type.
Source: W3C, JavaScript Comparison and Logical Operators, Section: "Comparison Operators". (Note: While W3C provides tutorials, the core specification is ECMA-262).
Keep practicing
Take the free 1D0-735 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1D0-735 practice questions
- Question 3Which of the following is an advantage of using the Virtual DOM?
- Question 4Which of the following comparison statement will return true? A) X=10; Y=11; y--; x==y B)…
- Question 6Marshall's computer previously contracted malware because he unknowingly clicked on an in…
- Question 7Which of the following is not a best practice when using JavaScript libraries?
- Question 10Scarlet has the following code in her script: Var namesArr =[‘’Joseph’,’ Charlotte’’, ‘’N…
- Question 12Which of the following will correctly declare the courseNumber variable as a siring data …
