Playing Around with Javascript
I recently started playing around with Javascript a bit more. I've used it for a lot of the more common tasks in the past: hiding/showing layers, rollovers, popups, and so on. Now I'm starting to look at the language and object model in more depth.There are some interesting surprises. In Javascript, objects appear to be nothing more than a series of key/value pairs. Methods are achieved by assigning a function as a value to a key (ala function pointers).
There's a distinct "string" primitive type, but there's also a string wrapper object that is dynamically swapped in when necessary, such as myString.length. There is a distinct number type, but there is no separation between integer and float. The number type also appears to have a wrapper. The event model seems to be split between W3C standards and IE.
Overall, it's a interesting language. It tries to do the right thing by default, but provides you deeper options if you so choose.
Playing Around with Javascript
Posted Apr 7, 2005 — 10 comments below
Posted Apr 7, 2005 — 10 comments below
Java Buns — Apr 07, 05 121
Scott Stevenson — Apr 07, 05 124
I also was looking for the Peachpit/QuickStart title, and might have realized it was newer (2003), if I had been able to actually find it in Borders.
The O'Reilly title seems quite complete (around 800 pages), but the writing is pretty dry.
Scott Stevenson — Apr 07, 05 127
Erik Hanson — Apr 08, 05 129
stephen rouse — Apr 10, 05 133
Scott Stevenson — Apr 10, 05 134
stephen rouse — Apr 10, 05 135
stephen rouse — Apr 11, 05 136
Erik Hanson — Apr 12, 05 137
Jason Short — May 20, 05 166