JavaScript is maligned
JavaScript has a poor reputation because it's used by people who don't know how to program and because some of the additional components it's normally associated with (ie the HTML DOM) are poorly implemented.
As a language though it's superb. Loosely typed, sure, but strong minds can handle weak types. It has closures and all of the fun bits that make Ruby so popular, and in terms of speed of development it's hard to beat.
I'm normally up to my eyes in Java but I've been using it a lot in it in non-browser environments lately and it's a pleasure (ok, it would be more of a pleasure if Sun and Mozilla hadn't diverged a few releases back - JSAdapter vs getters/setters, anyone?)
Don't make the mistake of tarring it because of it's users - like communism and religion, the underlying principles are sound but it's usually adopted by clowns. Take a look at here first. Or just go and use gmail for crissake.
http://javascript.crockford.com/javascript.html
http://www.crockford.com/javascript/private.html
http://blogs.sun.com/sundararajan/entry/self_javascript_and_jsadapter
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Creating_New_Objects:Defining_Getters_and_Setters
http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7