Variable

All declarations of the variable are unified into var. Either of the following is stored in this value : String, Number, Boolear, Object, null, undefined.

var i = 10;
// Definition of array
var a = [];
a[0] = 10;
a[1] = 20;
var a2 = [1000, true, "text"];


There are the following rules in a variable identifier.


In order to store string type, you enclose a text with ['] or ["]. If it includes these signs in a text, you write it as [\'] and [\"]. Line feed, a tab sign, and the "\" itself are [\n], [\t], and [\\], respectively.