To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you also consent to allowing this site to collect anonymised information about your visit. For more information or to opt-out of analytics, read this page.

JavaScript tutorial

Part 1 - An introduction

PartName
1.1
This is an introduction to my tutorial on JavaScript.

Part 2 - Getting started

PartName
2.1
This article shows you how to run JavaScript on your local computer.
2.2
This article will show you how to use comments in JavaScript.
2.3
This article will show you basic output methods.
2.4
This article will show you basic input methods in JavaScript.

Part 3 - The basics

PartName
3.1
This article will show you how to use functions in JavaScript.
3.2
This article will show you how to use variables and gives one solution to using constants.
3.3
This article will show you how to use arrays in JavaScript.
3.4
This article will discuss the different data types available in JavaScript.
3.5
This article discusses strings in JavaScript.
3.6
This article shows you how to use mathematics in JavaScript, including the purpose of each mathematical operator.
3.7
This article will be working with objects in JavaScript.
3.8
This article will show you how to work with dates.

Part 4 - Controlling the flow of a program

PartName
4.1
This article will show you how to use conditions in JavaScript.
4.2
This article will show you how to use if statements with conditions in JavaScript.
4.3
This article will show you how to use loops in JavaScript.
4.4
This article will show you how to use switch/case statements in JavaScript.
4.5
This article will show you how to handle errors in JavaScript.

Part 5 - JavaScript and the web

PartName
5.1
This article will show you how to include JavaScript in a web document.
5.2
This article will show you how to select items in the DOM.
5.3
This article will show you how to handle events.
5.4
This article will show you how to use cookies.
5.5
This article will show you how to style elements.
5.6
This article will show you how to validate forms.
5.7
This article will show you how to create HTML elements.
5.8
This article will show you how to load JavaScript content when the webpage has loaded everything else.
5.9
This article will show you how to use the technique of minification.