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);
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);
© 2024 python tutorials. python-tutorials.in