What\'s the best way of checking if an object property in JavaScript is undefined?
If you are using Angular:
angular.isUndefined(obj) angular.isUndefined(obj.prop)
Underscore.js:
_.isUndefined(obj) _.isUndefined(obj.prop)