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? :)
 
Soldato
Joined
8 Oct 2005
Posts
4,185
Location
Midlands, UK
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.
 
Associate
Joined
19 Feb 2009
Posts
338
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.
 
Soldato
Joined
20 Oct 2002
Posts
5,553
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.
 
Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
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.
 
Soldato
Joined
30 Sep 2003
Posts
10,916
Location
London
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
 
Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
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
 
Associate
Joined
23 Oct 2002
Posts
1,525
Location
That London, née Brighton
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.
 
Soldato
Joined
18 Oct 2002
Posts
5,464
Location
London Town
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