If you are new to javascript this tutorial would be a good place to start. Learn the basics of javascript, as well as some of the most commonly used javascript functions, such as: alert, prompt, redirect your web page's visitors.
An introduction to JavaScript, how it was born, what is it good for, different types and versions of this scripting language, and the compatibility between it and the browsers.
One of the most essential parts of the programming language is the ability to repeat some common action. This is called a loop or a cycle. You can find more details in this tutorial.