I am working on a javascript quiz for finding musical notation errors. The quiz enables users to click on an area of a canvas, and if that area contains an error, a rectangle (pre-defined) is drawn. This code relies on constructing 2d arrays. I have 3 sets of 2d arrays defined, but these arrays need to be deconstructed. What I am trying to do is call a function that creates a new array and fills it with all of the elements of my 2d arrays. What I have so far is:
function selectArray(array){
newarray = new Array;
for (var i = 0; i < array.length; i++){
for (var t = 0; t < array[i].length; t++){
newarray[i][t] = array[i][t];
alert(newarray);
}
alert(newarray)
}
}
I have tried this and several variations of this and nothing works. Any ideas?
Thank you very much!
Bookmarks