Nested If Statements

The sample code below shows how to use if statements inside other if statements (nested if statements). The video here explains all about nested if statements! <!DOCTYPE html> <html lang="en" …

If else statements

Often when using if statements, you will want to test more than just one condition. The sample code below explains how to do this. You can also watch the video …

If statements

An ‘if statement’ is used to test a condition. If the test condition evaluates to true (Eg. x is less than y), then the code inside the if statement will run. …

Blinking LED Arduino project

This video tutorial has been designed for those just starting out with Arduino. For this beginner project you will need an Arduino Uno board (or compatible board), an LED of …

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 …

‘If’ Statements in JavaScript

This tutorial explains how to use ‘if’ statements for conditional programming in JavaScript. An ‘if’ statement can be used to make decisions based on whether a condition evaluates to true or …

Arrays in JavaScript

This tutorial explains how to create an array in JavaScript. An array is a data structure (a way of storing and organising data) which, unlike variables, can store more than one value …

Variable scope in JavaScript

Variable scope refers to the context that a variable is defined in. JavaScript has two variable scopes: global and local. A global variable is a variable which is declared outside a function and its value …