And here's the equivalent code in jQuery:
And that is a fair comparison. In fact, the jQuery code does some error checking that the raw code example does not do.
I know which code I prefer to use. [ August 26, 2008: Message edited by: Bear Bibeault ]
Joined: Jul 16, 2008
Things happen very quickly on the web and lots of stuff can happen in one or two years. But at the same time, many things stay the same. For example, we still code around IE6 quirks (even IE5.5) and IE6 is a 7 years old browser!
Also there are pages created in the previous century which will likely stay unchanged "forever". Browser vendors cannot afford major backward compatibility breakage, so it's very likely that JS will live at least as long as the web as we know it does. JS is also used on the server, and on the desktop (windows scripting host, firefox extensions, etc)
there are different developments on the future JS front. Most recently, an attempt to make JS more like Java seems to have failed in favor of less radical approach. Some history of the JS future here