Is it possible for me to access every other item in an array? So basically, all items in positions 0, 2, 4, 6 etc.
Here\'s my code if it helps:
funct
If you just want this with lineLength and not with key, then add a second variable and use += when incrementing:
lineLength
key
+=
function pushToHash(key, value) { for (var t = 0, x = 0; t < value.length; t++, x += 2) { MQHash[key[t]] = value.slice(0, lineLength[x]); } }
(The power of the comma operator...)