Apologies if my question is unclear, allow me to clarify:
I have two arrays in 2D format:
const letterA = [ [...],[...],...];
const letterB = [ [...],[...],...];
const letterArray["A","B"];
I want to access them using a for loop like so:
let i = 0;
for(i = 0; i < letterArray.length; i++){
letter[ letterArray[i] ][foo][foo1]; //This is where I need assistance
}
Can someone please explain the syntax required for this?
Edit: I attempted the following:
eval('letter'+letterArray[i])[j][k]
but I encountered the error:
ReferenceError: letterA is not defined