How to check if a multidimensional array item is set in JS?
w[1][2] = new Array;
w[1][2][1] = new Array;
w[1][2][1][1] = 10; w[1][2][1][2] = 20; w[1][2][1][4] = 30;
How to check if w[1][2][1][3]
is set?
Solution with if (typeof w[1][2][1][3] != 'undefined')
doesn't work.
I don't want to use an Object instead of Array.
if (w[1][2][1][3] != 'undefined')
? – Overliberalw[1][2][1][3]
value is the text "undefined" – Beekeepingtypeof
way not work? – Beekeeping