Single Choice
Easy
QWhat is the result of the following code?
var x = "Hello";
var y = "World";
console.log(x in y);
ID: #4898
JavaScript Operator MCQ
195 views
Question Info
#4898Q ID
EasyDifficulty
JavaScript Operator MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
The in operator in JavaScript is used to determine whether an object has a particular property.
In this case, the in operator is called on x and y, with x as the left operand and y as the right operand.
Since y is a string and does not have any properties, the in operator will return false.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic