I'm using a 2D array to track the occurrence of a value, but I'm having issues manipulating the second-dimension value. My syntax is definitely off, as I store an integer in the 2D, but cannot get a manipulable integer back.
var list_elm = [occur1, 0], [occur2, 0] ...;
//stuff that checks for instances
var getNum = list_elm[[list_elm.length - 1][0]]; //last array item's second part
list_elm[[list_elm.length - 1][0]] += 1; //this version produces a string "01111..."
list_elm[[list_elm.length - 1][0]] = getNum++; //this produces NaN
I'm trying to increment: list_elm[...][this one].