Use the "in" statement.
For instance:
var o = {prop: "YES!"}; if ("prop" in o) { console.log(o.prop); }
Will generate the output:
YES!
In NodeJS.
Use the "in" statement.
For instance:
var o = {prop: "YES!"}; if ("prop" in o) { console.log(o.prop); }
Will generate the output:
YES!
In NodeJS.