Awesome, this exactly what I need. I just tweaked the code so that I don't have to pass object as argument:
colors.makeNonEnumerable('length', 'activeColor'); Object.defineProperty(Object.prototype, 'makeNonEnumerable', { value: function() { var propertyName; var propertyDescriptor; for (var i=0; i<arguments.length; i+=1) { propertyName = arguments[i]; propertyDescriptor = Object.getOwnPropertyDescriptor(this, propertyName); propertyDescriptor.enumerable = false; Object.defineProperty(this, propertyName, propertyDescriptor); } }, enumerable : false, configurable : true, }); -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here: http://www.mail-archive.com/jsmentors@googlegroups.com/ To unsubscribe from this group, send email to jsmentors+unsubscr...@googlegroups.com