Promotic
WikipediaLinkedInYoutubeTwitterFacebook

var - statement of language JavaScript

Description:
Declares variables.
Syntax:

var name [, ...];

var name [ = value [, ...]];

 
name Name of the variable
Note:
Variables declared with var in the procedure are available only within the procedure.
 
For similar purpose in the VBScript language is used the command Dim and Set.
Example:
var nVar, nNum; //Declare two variables
var nVar = 5, sVal = "text"; //Creation of two variables with assigned values
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice