check if js property exists in class

JavaScript
myObj.hasOwnProperty(myProp)
Source

Also in JavaScript: