JavaScript/Reserved words/var
Appearance
The var keyword
[edit | edit source]The var keyword is optional and used to declare a variable. This operator is necessary if the code includes the line "use strict;".
Syntax
[edit | edit source] var variable[, variable2, …];
Examples
[edit | edit source] var number = 17;
number += 2; // number is now 19
var theArray = new Array();