Module

JavaScript Basics

7 tutorials
beginner

Before attempting this module, you likely would have completed the HTML and CSS modules. Together with JavaScript, they form the trinity in frontend web development. In this module, you will be introduced to Javascript, the last member of the trinity. It is a very useful language to make your websites more interactive. You will start with learning the basics of Javascript such as declaring variables and working with loops.

Then, in the fourth tutorial onwards, you will further your understanding of JavaScript through learning how to create functions, which are one of the most important building blocks in JavaScript. These functions can potentially help you save a lot of time. Thereafter, you will look into using JavaScript for form validation. This will allow your forms to accept specific types of responses that you want, such as numbers or email addresses. You will also be learning Document Object Model, or DOM for short, which is key to helping you make changes to the style and content of your webpage. Finally, we will learn how to use external modules such as the Math module, anonymous functions, objects, and hoisting.

Helpful prior knowledge

HTML Intermediate, CSS Basics


Learning Outcomes

By the end of this module, players would have learnt:

  • What Javascript is
  • How to declare variables
  • How to differentiate between different data types
  • How to create conditionals and loops
  • Declare and write a custom function
  • Use regular expressions (regex) for form validation
  • Use JavaScript to access elements via DOM
  • Use event listeners to respond to user actions
  • Use the common functions within the Math Module
  • Use objects in JavaScript like creating an object, reading the object properties, updating an object with its key and deleting a property
Oops, you are not logged in!

Please log in to view this page, and provide additional information required (if any) to unlock the full experience on Learn.