How to check if a variable is an Array in JavaScript?
Originally posted here!
To check if a variable is an array, there is more than one way to do it in JavaScript.
We can use:
The Array.isArray() method (Fastest ๐).
The constructor property in the variable itself.
The instanceof operator in JavaScri...
melvingeorge-me.hashnode.dev3 min read