Some Basic Data Types and Data Structures
Most interactions with browsers require us to validate either string or integer data.
Both these can be stored in regular javascript variables.
Since we work with web UIs, Sahi's need for data structures is fairly minimal.
The few that are used are:
var $ar = ["Ram", "Sam", "Jam"];
var $firstUser = $ar[0]; // returns "Ram"
var $ar2d = [["Ram",18], ["Sam",20], ["Jam",25]];
var $firstRow = $ar2d[0]; // returns ["Ram",18]
var $firstUser = $firstRow[0] // returns "Ram"
// or
var $firstUser = $ar2d[0][0] // returns "Ram"
var $userInfo = {"name":"Ram", "age":"18"};
var $userName = $userInfo["name"];
var $userAge = $userInfo["age"];