Quantcast
Channel: Alice, Bob, and Mallory: JavaScript hash table keys
Browsing latest articles
Browse All 3 View Live

"JavaScript hash table keys" by Ned

It looks like you’ve got a copy/paste error in your first snippet. “for (k in ht)” should probably be “for (k in obj)” now that the loop’s been moved to its own function.

View Article



"JavaScript hash table keys" by Jonas Elfström

Nice catch, fixed. Thanks!

View Article

JavaScript hash table keys

In JavaScript you can add properties to objects dynamically. You can access those properties both by object.foo and object['foo']. The later is commonly used to use JavaScript objects as hash tables...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images