Community

Using Javascript’s IN Operator To Test For Object Property Existence

(Ben Nadel) A small, but powerful tip that I picked up while reading Cody Lindley’s jQuery Enlightenment book, was the use of Javascript’s IN operator to test for object property existence. Before that, I had only ever used the IN operator to iterate over an object’s keys, as in:

Read More - Register for Free Membership