It's a scripting language with it's main purpose to add interaction to a static page. You can do a lot with it, like modify the CSS, do stuff when someone clicks on a button, make image sliders, do animation, and a lot more.
Also, remember that libraries don't add anything new. Everything you can do with a library can be done in regular js (Regular JS is known as ‘Vanilla JS’).
With this, I conclude the intro. Let's start!
Learn at Codeacademy
Codeacademy was my best guide when I started to learn the language.
I started doing 1-2 exercises everyday, and soon reached 5 exercises each day.
Codeacademy basically is lesson style learning. You are presented with a set of tasks, and a few instructions, and you have to complete the tasks using the code editor you are given. Once you submit, they verify the code. If you pass, you continue with the next exercise.
I find it a great way to learn new things. Your mileage may vary.
Browse the MDN.
The MDN will be your single best resource while learning this language.
You'll learn a lot, quickly.
Follow Some Blogs
Here are a few blogs you must follow. Try and check each out at least once a day.
Read a few Books
Books are the best way to learn JS, and are a handy reference when you want to check something later on.
Some resources where you can ask questions, read about things, and keep up with latest happenings. I highly recommend all of these, as I use each on an (almost) daily basis.
- StackOverflow - JS
- Smashing Magazine - JS (Warning, advanced!)
- Mozilla Development Network, MDN
The best advice I can give you is to keep experimenting, browse random pages of the mdn, try out new things.
A few challenges for you to complete, try and get input from HTML instead of JS (so you learn a bit about client-side js too).
Bonus points if the things happen live, like in ROT13ify (I'll write a tutorial about it soon, most probably) -
- Get all prime numbers till a specific number the user enters. (Hint: Use Modular (%) and use the break statement)
- Reverse the text which has been entered by the user (Bonus if not using ‘.reverse()’. Remember, you can use "string".[number] to get a specific character of a string!)
Best of luck.
PS. Don't use w3schools!
Discuss on Twitter