Check if property exists in Javascript
· ☕ 3 min read
Quickly check whether a property exists against an object.
There is more than one way to check whether a given object has a prop - the choice if often convenience rather than performance of the said method.
Let’s see the various methods by taking this example of a simple object.