I'm trying to setup a multidimensional array where I can push value into it where it needs to.
For example, I have a cacheArray = new Array(col0Array, col1Array, col2Array); which would accessible using cacheArray[0] etc...
Now, in a loop I would check cacheArray[column_number].length, which would be the length of whichever colArray. Depending on that I want to cacheArray[column_number].push("my_class");
My intention is to add the css class name to the sub column arrays, and check the previous value in the sub array for that column so I can get a checkered colour effect. But pushing like I did gives me an error: cacheArray[column_number].push is not a function.
Any ideas on how to approach this problem?