This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JavaScript Statements

JavaScript statements are separated by semicolons.

var a, b, c;     // Declare 3 variables
a = 5;           // Assign the value 5 to a
b = 6;           // Assign the value 6 to b
c = a + b;       // Assign the sum of a and b to c
document.getElementById("demo1").innerHTML = c; // outputs the value of c to HTML element with id "demo1"