I'm a new graduate, but I have been doing web development for about six months. When I was finishing university the server side languages (PHP, Java) were more important then client side languages. JavaScript was only used to validate data or use AJAX to beautify the page. The server side validation was of course done anyways.As I dive into more projects, I can see that JavaScript is used a lot. It's mostly to create visual effects, but an important part is used to convey data (JSON) and make requests (AJAX). In a project I'm following, JavaScript takes up 30%-40% of the codebase!My question is: Is JavaScript that important?. My first impression was not good, but I also realize that it requires skill to write good JavaScript. It seems to be very easy to write, so it's so damn hard to manage and very hard to identify the flow of JavaScript.P/s: A lot of tricks, tips, library(like JQuery) and tutorials are out there, they are a lot but I don't know the best way to start. So I'm very grateful if someone could give me an advice.UPDATE: As now i'm on the way with javascript, thanks for all helpful advices. I will try to summarize the answers, so that it can be a good source for anyone with the same problem.Javascript:Why it good:Best User interfaceLots of good frameworkServer side javascript (MongoDB & Node.js)Many success application built from it (Gmail is an example)Object-oriented ableGood support (HTML5 included)Important ConceptClosure (event handling)Best practiceNothing global. Try to use namespaces/libraries and classesNever function (controversial). I still use function, and it seems not very bad.ResourcesMozilla Developer NetworkDouglas CrockfordW3Schools (starter)TizagJavascript - The definite guide (ebook) (recommended by Douglas Crockford)Head first Javascript (ebook)Head first Ajax (ebook)Head Rush Ajax (ebook)Object-Oriented JavaScript: Create scalable, reusable high-quality JavaScript applications and libraries by Stoyan Stefanov.Javascript Koans FrameworkMootoolsPrototypeDojoExtJSYUIGWTServer side: MongoDB & Node.jsAlternative for Javascript (thanks Mike Samuel)GWT : code.google.com/webtoolkit  (java)coffee script (python)Again, I want to thank you for all the answers and opinion, as I got great benefit from all of them. Still, due to the fact that I just only can accept one answer, the answer of Renesis, for his mention about closure, which is helpful for me.
The importance of javascript and the best way to learn it?
learning;javascript;language discussion
At the moment, JavaScript is essential for a web application or web site unless you are simply going to have static pages. You need to learn it.I am a big proponent of learning the language itself, but if you must also use it practically and do not already have or need a custom framework, I would use and learn jQuery.  It is a great framework in both its design and its functionality.Make sure to learn how closures work (defined basically: functions as variables) and this will help you understand a lot of how jQuery's underpinnings work.One important tip, that if not followed, will let code get out of control very quickly: Try not to ever use the global space for anything but namespaces/libraries and classes! (Never functions!)