JavaScript tutorial series

Welcome to the JavaScript tutorial series. Here you will find a wide range of tutorials that will teach you the basics of the JavaScript programming language. You will learn how to add JavaScript code to a website and work on several projects including a calculator, multiple-choice quiz program, and 2D game. This tutorial series is a great start to web development, game design, and app design with JavaScript.

Nearly every tutorial includes a video that shows you exactly what to do along with sample code so you can try it out yourself. All tutorials are listed so that you can start with basic coding concepts and gradually move up to intermediate and advanced concepts. You can start from the very first tutorial or skip to any tutorial if you already have some JavaScript skills and are looking for something in particular.

This tutorial series is currently being updated for 2021. The tutorials in bold below have been recently updated.

  1. Introduction to JavaScript (display a simple message in the browser)
  2. Variables and data types
  3. Arithmetic
  4. Strings
  5. Events 
  6. Functions
  7. Calling functions from events
  8. Variable scope
  9. Arrays
  10. Array methods
  11. Finding the length of arrays (and strings)
  12. Multi-dimension arrays
  13. If statements (if, else if, else)
  14. Nested if statements
  15. Using and/or operators in an if statement
  16. Switch statements
  17. While loops
  18. Do..while loops
  19. For loops
  20. Looping through arrays (and strings)
  21. forEach loop
  22. Objects, properties and methods
  23. Using the getElementById() method
  24. Using the getElementsByClassName() method
  25. Changing an image using getElementById() method
  26. Swapping images back and forth using JavaScript
  27. Swapping images using an interval timer
  28. Taking user input from a form
  29. Treating text input from a form as an integer
  30. Submitting forms
  31. Validating form data
  32. Radio buttons and form validation
  33. Checkboxes and form validation
  34. Alert boxes and confirmation boxes
  35. JavaScript prompts (user input boxes)
  36. Keyboard events in JavaScript
  37. Introduction to JSON
  38. Making a 2D game with JavaScript and HTML5 canvas
  39. Make a multiple-choice quiz with JavaScript

Where to next?

If you have completed the JavaScript tutorials and have a craving to learn more, then why not check out the HTML5 canvas? You can use the HTML5 canvas and JavaScript to draw shapes, make animations and develop games! Click here to check out the HTML5 canvas tutorials.

Sample code for JS projects

You can also access the code to different JS projects here:

  1. JavaScript calculator program
  2. JavaScript quiz program