How to check if an anonymous object was created this way:
var myObj = { prop1: 'no', prop2: function () { return false; } }
really has prop2 defined?
prop2 will always be defined as a function, but for some objects it is not required and will not be defined.
I tried what was suggested here: How to determine if a native JavaScript object has a Property / Method? but I donβt think it works for anonymous objects.
javascript
Omar Jun 09 '10 at 15:45 2010-06-09 15:45
source share