I am new there . I want to check in console only without declaring any another variable if a particular value is existed in the object or not ?
For example :
var obj = { name: "Clarion" , id:"0" ,… }
Now i want to check if name is existed in the object or not !!
>Solution :
You can use my code :
const BTS = { name: 'Kim Seok-jin', stageName: 'Jin' };
console.log('name' in BTS);
console.log('age' in BTS);
OUTPUT :
true
false
Happy Coding !!