As we already know JavaScript array is an object.
JavaScript operator typeof always returns "object":
To solve this problem ECMAScript 5 defines a new method Array.isArray(),
The problem with this method is that it is not supported in older browsers.
Now we have only two trusted solutions:
Solution 1: Create your own isArray() function that will return true or false.
Solution 2: Use instanceof operator.
- Home
- _About
- _Contact
- Asp.Net C#
- Blogger
- CDN
- _Bootstrap Library, CSS, Font
- _jQuery Library
- _Moment Library
- JavaScript
- jQuery
- MongoDB
- MSSQL
- Nuget
- Tech
- Tools
- _EXCEL To BSON
- _EXCEL To JSON
- _Get Date Array
- _HTML Entity Encoder & Decoder
- _Image to Base64
- _JSON To HTML Table
- _Keyboard Key Values
- _ObjectId to Timestamp
- _Youtube Video Thumbnail
No comments