Verifique se a instância é a matriz

Method 1: Using the isArray method
Array.isArray(variableName)'

Method 2:
variable instanceof Array

Method 3:
variable.constructor === Array
Samiksha Singla