jQuery.isArray( obj )
Returns: Boolean
Description: Determine whether the argument is an array.
$.isArray() returns a Boolean indicating whether the object is a JavaScript array (not an array-like object, such as a jQuery object).
Examples
Finds out if the parameter is an array.
$("b").append( "" + $.isArray([]) );
Full source:
<!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){ $("b").append( "" + $.isArray([]) ); }); </script> </head> <body> Is [] an Array? <b></b> </body> </html>
Was this information helpful?

