How do you begin learning javascript for web?

Soldato
Joined
9 Jun 2006
Posts
4,227
Location
Purgatory
The only coding language I know is HTML (and CSS if that counts). I'm mighty confused by javascript - it seems like there's a number of different "frameworks" and other such things, which I have no idea about.

So what websites or books should I be looking at to begin learning the language for use on web sites? :)
 
The only coding language I know is HTML (and CSS if that counts). I'm mighty confused by javascript - it seems like there's a number of different "frameworks" and other such things, which I have no idea about.

So what websites or books should I be looking at to begin learning the language for use on web sites? :)

Would personally learn the absolute basics first, w3schools.com is always a good place to start.

Depends how your leanr best too - by reading a book or doing something practical. Personally I learn the most when I take something aprt to find out how it works.
 
You should try and at least learn the basics of the language before you use a framework like JQuery. Although you could just leap in and get good results by knowing the basics you will save yourself a lot of time and effort when you want to customise things. As said above W3Schools is a great place to start with almost everything web related.
 
When I was going to learn JavaScript someone recommended JavaScript: A Beginner's Guide, book by John Pollock think there's a third edition coming out in a few months.
 
You should try and at least learn the basics of the language before you use a framework like JQuery. Although you could just leap in and get good results by knowing the basics you will save yourself a lot of time and effort when you want to customise things. As said above W3Schools is a great place to start with almost everything web related.

I learned JavaScript just by jumping straight into jQuery, which seemed to work quite well for me. It certainly makes it easier and faster to get results, which in turn makes it more fun and easier to learn (in my opinion). Then again I did already have a thorough understanding of C# (which is more useful than PHP for learning JavaScript) before I started, which made learning it much easier.
 
There's so many good scripts on the web that it could be a good idea to take a script and figure out how it works, then hone your skills by hacking it to do something else. Once you've learnt the basic stuff, I always think it's best to think of a project of your own to incorporate the JS into. That's what I did for PHP and it helped me keep interest.

I used to be reasonably good at JS. Then I got into PHP and I've forgotten everything :p
 
There's so many good scripts on the web that it could be a good idea to take a script and figure out how it works, then hone your skills by hacking it to do something else. Once you've learnt the basic stuff, I always think it's best to think of a project of your own to incorporate the JS into. That's what I did for PHP and it helped me keep interest.

I used to be reasonably good at JS. Then I got into PHP and I've forgotten everything :p

PHP and JS complement each other perfectly though :p
 
Learning javascript is tortuous and arduous, made moreso by different browsers implementations, and for a first language contains many complex concepts and things which can throw you. It's hugely powerful, which makes it tricky too.

But once you start to get it, it's awesome! As ever with learning web stuff, my advice is to find someone else that's got something you like on their site, View Source and find out how they did it. The other way to learn it is to decide on a specific effect you want to achieve, and then work towards that. Asking on here for which direction to go in is always a good start. Reading theory books and doing the exercises therein is all well and good but the best way to learn (most of the time) is by doing, and moreso, doing something you yourself came up with.
 
For a non-programmer I highly Jeremy Keith's book "DOM Scripting: Web Design with JavaScript and the Document Object Model" - http://www.domscripting.com/book/ He's one of the most respected people in the industry on the topic of javascript.

It'll give you a good, gentle introduction into writing javascript on some real projects and doesn't get you bogged down in syntax and unnecessarily technical writing. It's likely you'll be using Javascript primarily for DOM-scripting (enhancing/manipulating web pages) rather than mathematical or computational programming, so I recommend focusing on DOM-scripting.

Avoid using a framework until you at least have the basics of syntax and an understanding of what the DOM is before; especially with DOM-centric framework like jQuery or Prototype. Frameworks are there to help you write code faster and sidestep all the problems with cross-browser implementation, but they hide a lot from you.
 
Last edited:
Back
Top Bottom