JavaScript Objects

JavaScript objects are written with curly braces. Object properties are written as name: value pairs, separated by commas. Example var person […]

JavaScript Arrays

JavaScript arrays are written with square brackets. Array items are separated by commas. The following code declares (creates) an array […]

JavaScript Booleans

Booleans can only have two values: true or false. Example var x = 5; var y = 5; var z = 6; (x == y)       // Returns […]

JavaScript Numbers

JavaScript has only one type of numbers. Numbers can be written with, or without decimals: Example var x1 = 34.00;     // Written with […]

JavaScript Strings

A string (or a text string) is a series of characters like “John Doe”. Strings are written with quotes. You […]

Skip to toolbar