View Single Post
  #1 (permalink)  
Old June 5th, 2006, 03:54 AM
adspring adspring is offline
Registered User
Join Date: Jun 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default associative arrays as objects left out

Throughout chapter 3 (object basics), you extensively use "var o = new ClassName();" as a way of creating classes, however only until chapter 6 (DOM basics) do you give us a glimpse of how to create associative arrays (i.e. hashes) with the "checking the Node type" section.

I am a bit confused... Is the associative array way of creating and accessing properties a non-standard approach in OO in JavaScript? It's very Perlish, and a more elaborate explaination of for/against this approach would be most appreciated.

Reply With Quote