how to test for variable property in object javascript code example Example: check if js property exists in class myObj.hasOwnProperty(myProp)