_.isArray

Returns true if given value is an array.

  1. // Lodash
  2. var array = []
  3. console.log(_.isArray(array))
  4. // output: true
  5.  
  6. // Native
  7. var array = []
  8. console.log(Array.isArray(array));
  9. // output: true

Browser Support for Array.isArray()

ChromeEdgeFirefoxIEOperaSafari
5.0 ✔4.0 ✔9.0 ✔10.5 ✔5.0 ✔