21.
Which of the following methods checks if a variable is an array in JavaScript?
isArray()
Array.isArray()
typeofArray()
checkArray()
Correct: B
The Array.isArray() method is used to determine whether a value is an array or not. It returns true if the given value is an array and false otherwise.