Q. Which of the operator is used to test if a particular property exists or not?
β
Correct Answer: (C)
in
Explanation:
The in operator is used to test if a property exists in an object or in an array. For example:
let obj = { name: "John", age: 30 };
console.log("name" in obj); // true
console.log("address" in obj); // false
This checks if the property (e.g., "name") is present in the object (obj).