J
JRough
This is the time array, with hour key value pair.
var time = new Array();
time['hour'][0] = "12:00";
time['hour'][1] = "13:00";
time['hour'][2] = "14:00";
time['hour'][3] = "15:00";
time['hour'][4] = "16:00";
time['hour'][5] = "17:00";
time['hour'][6] = "18:00";
time['hour'][7] = "19:00";
time['hour'][8] = "20:00";
time['hour'][9] = "21:00";
time['hour'][10] = "22:00";
time['hour'][11] = "23:00";
time['hour'][12] = "24:00";
time['hour'][13] = "1:00";
time['hour'][14] = "2:00";
time['hour'][15] = "3:00";
time['hour'][16] = "4:00";
time['hour'][17] = "5:00";
time['hour'][18] = "6:00";
time['hour'][19] = "7:00";
time['hour'][20] = "8:00";
time['hour'][21] = "9:00";
time['hour'][22] = "10:00";
time['hour'][23] = "11:00";
// show the values stored
for (var i in time[hour]) {
{ }
}
I think there is another loop inside the for in that adds the
minutes [00,01,02,03,04....60]
and also another one for the seconds? If you could give me an
example. I read the page on Hash TAbles and it isn't clear.
http://www.mojavelinux.com/articles/javascript_hashes.html
Thanks,
var time = new Array();
time['hour'][0] = "12:00";
time['hour'][1] = "13:00";
time['hour'][2] = "14:00";
time['hour'][3] = "15:00";
time['hour'][4] = "16:00";
time['hour'][5] = "17:00";
time['hour'][6] = "18:00";
time['hour'][7] = "19:00";
time['hour'][8] = "20:00";
time['hour'][9] = "21:00";
time['hour'][10] = "22:00";
time['hour'][11] = "23:00";
time['hour'][12] = "24:00";
time['hour'][13] = "1:00";
time['hour'][14] = "2:00";
time['hour'][15] = "3:00";
time['hour'][16] = "4:00";
time['hour'][17] = "5:00";
time['hour'][18] = "6:00";
time['hour'][19] = "7:00";
time['hour'][20] = "8:00";
time['hour'][21] = "9:00";
time['hour'][22] = "10:00";
time['hour'][23] = "11:00";
// show the values stored
for (var i in time[hour]) {
{ }
}
I think there is another loop inside the for in that adds the
minutes [00,01,02,03,04....60]
and also another one for the seconds? If you could give me an
example. I read the page on Hash TAbles and it isn't clear.
http://www.mojavelinux.com/articles/javascript_hashes.html
Thanks,