Skip to content

Variable Declarations

Davis Brown edited this page Aug 30, 2018 · 3 revisions

There are 2 ways to declare the existence of a variable.

Declaration:

var _x;
var globalX;

Declaration + Initialization:

var _x = 5;
var globalX = 5;

Variables that have already been declared can have their values reassigned trivially

Assignment:

_x = _x + 2;
Clone this wiki locally