Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 510 Bytes

File metadata and controls

33 lines (24 loc) · 510 Bytes

Variable

A variable is a value associated with a name. To simplify, imagine a box in your memory with a "name" pointing to it, and inside this box is a value.

Declaration

To declare a variable, use the var keyword followed by the variable name, an equals sign =, and the initial value.

var name = value;

Examples

var a = 5;
print(a);
var x = 5.6456454;
print(x);
var y = "Hello World";
print(y);
var z = true;
print(z);