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
- CDN
- _jQuery Library
- _Moment Library
- _Bootstrap Library, CSS, Font
- Nuget
- Tools
- _EXCEL To JSON
- _EXCEL To BSON
- _Get Date Array
- _JSON To HTML Table
- _HTML Entity Encoder & Decoder
- _ObjectId to Timestamp
- _Keyboard Key Values
- _Yootube Video Thumbnail
- JavaScript
- jQuery
- Asp.Net C#
- MSSQL
- MongoDB
- Blogger
- Tech
No comments