JavaScript program to check if a key exists in an object:
let obj = {name: "John", age: 30};
let key = "name";
console.log(key in obj);
python tutorials and learn python
JavaScript program to check if a key exists in an object:
let obj = {name: "John", age: 30};
let key = "name";
console.log(key in obj);
© 2026 python tutorials. Built using WordPress and EmpowerWP Theme.