Hi all,
I'm having real problems. I want to test if a value exists at a certain location within a double-key array.
My code is as follows (JS)
I keep getting type errors (TypeError: Cannot read properties of undefined (reading '6'))
I'm missing something silly but cannot work it out!!!
Thanks
I'm having real problems. I want to test if a value exists at a certain location within a double-key array.
My code is as follows (JS)
Code: Select all
if ((board[(die_x + 1)][die_y] === undefined) &&
(board[(die_x + 2)][die_y] === undefined) &&
(board[(die_x + 3)][die_y] === undefined)) {
return_value = true;
}
I'm missing something silly but cannot work it out!!!
Thanks