0

If I'm trying to access an item in a two dimensional array:

const a = b[row][column]

if b[row] returns undefined, this will throw an error.

Is there a short handed syntax to try and access the column safely, besides first checking that b[row] is defined with an if statement ?

sir-haver
  • 3,096
  • 7
  • 41
  • 85

0 Answers0