Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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}'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #var #js
ADD COMMENT
Topic
Name
3+9 =