Is it possible to create array archive in JavaScript? If so, how can I do this? If I have some data: for example 1- 5.
You can create an object:
var obj = {my1 : 'Data', my2: 'other'}; or
var array = ['data', 'other']; You can access all data
for (var key in the array) {item = array [key]; } (Var key in obj) {item = obj [key]; }
Comments
Post a Comment