you'll see that obj now yields 5.
Jack: yes, it's because it's getting converted to a string internally (as mentioned in the article and as re-iterated by Tim). Because both are converted to strings internally, the second "8" always overwrites the first.
"(Picture JSON as the prim and proper school girl and Ajax the dude who smokes and rides a motorcycle to school.)"
But JSON is a boy's name. ;-)
"But JSON is a boy's name."
AJAX is a Dutch football team's name, but no-one ever complains about that :)
May I give it a try? Just starting off putting js stuff into my work. We'll see.
Hi. My name is Jonathan Snook and this is my site. I write about what interests me, which is usually web design, development, and technology. I'm also in the middle of a food adventure and I like whisky.
I wrote SMACSS. I tweet. Want to learn more?
© Jonathan Snook