Which function in Ember.js is used to test whether the value is an array or not?

Category: Web Design HTMLWhich function in Ember.js is used to test whether the value is an array or not?
Editor">Editor Staff asked 2 years ago

Which function in Ember.js is used to test whether the value is an array or not?

1 Answers
Editor">Editor Staff answered 2 years ago

The isArray function is used to check whether the value is an array or not. It returns true if the passed object is an array or Array-like. The Objects are considered to be Array-like if any of the following are true:

  • The object is a native Array
  • The object has an objectAt property
  • The object is an Object and has a length property