If you want to get started on learning Javascript there is one resource which I find extremely helpful:

The nice thing is that all the basics are covered and all examples in the online book are interactive. You can start playing with it right away.

Best part: it's free!