A
Q. The statement p===q refers to _________
- Correct Answer - Option(D)
- Views: 7
- Filed under category JavaScript
- Hashtags:
A
In JavaScript, the === (strict equality operator) checks both:
Example 1: Equal in Value and Type (true output)
var p = 10;
var q = 10;
console.log(p === q); // Output: true (same value and same type)
Example 2: Same Value, Different Type (false output)
var p = 10; // Number
var q = "10"; // String
console.log(p === q); // Output: false (different types: number vs string)
Why Not Other Options?
Final Answer:
✅ (D) Both p and q are equal in value and type.
You must be Logged in to update hint/solution
Be the first to start discuss.
Discusssion
Login to discuss.