DEV Community

Discussion on: 7 Beginner's Tricks in Using Arrays in JavaScript

Collapse
nijeesh4all profile image
Nijeesh Joshy • Edited on

isnt using Array.isArray() a better approach for checking whether the object is an array or not?

developer.mozilla.org/en-US/docs/W...

Collapse
tangweejieleslie profile image
Leslie Tang Author

Thanks for pointing that out, truth be told, I wasn't aware of Array.isArray().

I wrote this article as a summary of reading "JavaScript: The Good Parts by Douglas Crockford", 2008. Page 58-64. Hence, the reason why the points in the article might not be the best/latest.

Collapse
dannyengelman profile image
Danny Engelman

Not to sound like an old grumpy guy...
Instead of reading a 11 year old article by that old grumpy Crockford

You are better of reading the Array documentation,
and learn all Array methods listed in the left column

developer.mozilla.org/en-US/docs/W...

In general if you want to learn/read documentation,
all you type in Google is: js mdn [topic]

So in this case: js mdn array

Keep on learning!

Thread Thread
nijeesh4all profile image
Nijeesh Joshy

For becoming zero to hero on modern Js mdn is the best resource out there.

Thread Thread
tangweejieleslie profile image
Leslie Tang Author

Thanks for the advice! Really appreciate the feedback. It's critical feedback like this that can help inexperienced newbies like me learn what's truly useful.

I've read that book because it was one of the resources recommended to me, so I've used that as a starting point.