how to give variable type in javascript code example
Example 1: how to define variable in javascript
var <variable-name>;
var <variable-name> = <value>;
Example 2: var = {} js
//An array is a type of object intended to be only assigned numeric keys
var tmp = []; // or: var tmp = {}
tmp.one = 1;
JSON.stringify(tmp);
// array:
'[]'
// object:
'{"one":1}'