Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between Array.isArray and jQuery.isArray?

They seem to be the same.

Internally jQuery just maps its own $.isArray to the native Array.isArray.*

like image 417
Victor Dombrovsky Avatar asked Oct 30 '25 15:10

Victor Dombrovsky


2 Answers

After further investigation I found this commit where they replaced jQuery.isArray with the native Array.isArray().

They also announced here that $.isArray is officially deprecated.

The function still exist for backward compatibility but I guess it will be dropped completly in a future jQuery release.

like image 187
Alon Eitan Avatar answered Nov 02 '25 05:11

Alon Eitan


There is no difference.

jQuery just prototype the JavaScript's native isArray function.

something that will look like-

jQuery.prototype.isArray = Array.isArray;
like image 33
Sagar V Avatar answered Nov 02 '25 03:11

Sagar V



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!