JavaScript isset() equivalent
I generally use the typeof operator: It will return “undefined” either if the property doesn’t exist or its value is undefined. (See also: Difference between undefined and not being defined.) There are other ways to figure out if a property exists on an object, like the hasOwnProperty method: And the in operator: The difference between … Read more