Validating form data

In this tutorial, you will learn how to use JavaScript to validate form data. Form validation ensures that the correct form data has been provided by the user. For example, …

Submitting forms

This video tutorial explains how to create a form which can accept a username and password, and then submit the form data. The video only explains how to use the text …

User input with forms

We will now start using forms to take user input. Forms include elements such as input text boxes, checkboxes, radio buttons, drop-down lists, and submit buttons. In this tutorial, we …

Do..while Loops

Unlike the regular while loop, a do..while loop will run the block of code in the loop first and then check if the condition evaluates to true before it runs again (rather …

While loops in JavaScript

A while loop runs a set of instructions (block of code) while a test condition evaluates to true. A while loop can repeat a set of instructions over and over …

Switch Statements in JavaScript

Switch statements are used to run different blocks of code based on different conditions. They are similar to ‘If’ statements but can be a little neater when working with many conditions. This …