answer = function (choice) {
mychoice = choice+"Array"; // --->possible?
mychoice.push(myArray*); // --->possible?
/*
if (choice == "YES") {
YESArray.push(myArray*); // THIS IS WHAT IT DOES
} else if (choice == "NO") {
NOArray.push(myArray*);
}
*/
};
//
//---arrays
YESArray = new Array();
NOArray = new Array();
//
//---buttons
button_Y.onRelease = function() {
answer("YES");
};
button_N.onRelease = function() {
answer("NO");
};
In the 1st and 2nd lines of the function I would like to somehow combine the value of the answer function (either “YES” or “NO”) with the string “Array” so that it is read as “YESArray” or “NOArray” so that i can use that to push a value into those pre-existing arrays. INSTEAD of running the “IF” statement code I have commented out.
is this possible?
…and are we ever going to get our colored “AS” tags back?