-3
rated 0 times
[
3]
[
6]
/ answers: 1 / hits: 16471
/ 12 Years ago, sat, april 28, 2012, 12:00:00
I am looking to create a simple array using a time stamp for the index so that I can access the values by timestamp without iterating through the array, however I am struggling!
I need to be able to set 2 values for each row.
For example:
var myarray = [];
var test1 = 'hello'
var test2 = 'world'
myarray[timestamp] = [test1, test2];
So for a given timestamp e.g. 12345678, how could I access the value of test2?
Appreciate any thoughts and advice.
Regards, Ben.
More From » arrays