There are two more,
testArray.constructor === Array // true testArray.constructor.name === 'Array' // true
Also, I believe .constructor.toString() === 'function Array() { [native code] }'
.constructor.toString() === 'function Array() { [native code] }'
But if a class extends Array, most cases become false, except Array.isArray and instanceof.
Array.isArray
instanceof
Thank you for the response, I have included your suggestions...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There are two more,
Also, I believe
.constructor.toString() === 'function Array() { [native code] }'
But if a class extends Array, most cases become false, except
Array.isArray
andinstanceof
.Thank you for the response, I have included your suggestions...