Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript Array.isArray

// all following calls return true
Array.isArray([]);
Array.isArray([1]);
Array.isArray(new Array());
Array.isArray(new Array('a', 'b', 'c', 'd'));
Array.isArray(new Array(3));
// Little known fact: Array.prototype itself is an array:
Array.isArray(Array.prototype);

// all following calls return false
Array.isArray();
Array.isArray({});
Array.isArray(null);
Array.isArray(undefined);
Array.isArray(17);
Array.isArray('Array');
Array.isArray(true);
Array.isArray(false);
Array.isArray(new Uint8Array(32));
Array.isArray({ __proto__: Array.prototype });
Comment

PREVIOUS NEXT
Code Example
Javascript :: moment get week day 
Javascript :: refresh page on div click 
Javascript :: javascript create array from 1 to n 
Javascript :: js get input from user 
Javascript :: javascript redirect to route laravel 
Javascript :: js click element 
Javascript :: dom click is not a function 
Javascript :: js matrix 
Javascript :: Finding HTML Element by Id 
Javascript :: javascript remove character from string 
Javascript :: javascript date get future 15 minutes 
Javascript :: javascript innerwidth 
Javascript :: javascript colorized console.log 
Javascript :: vertical align text canvas 
Javascript :: write bytes64 in json python 
Javascript :: remove empty element from array js 
Javascript :: regex match everything except 
Javascript :: react json object pretty 
Javascript :: fluttter http get 
Javascript :: is_int js 
Javascript :: how to modify external json file javascript 
Javascript :: Facebook passport Oauth authenticate strategy 
Javascript :: jquery select all except first child 
Javascript :: reactnative get height screen 
Javascript :: input to state 
Javascript :: redirect with javascript 
Javascript :: angular serve 
Javascript :: when does localstorage get cleared 
Javascript :: yarn add react-native-elements 
Javascript :: js get all indexes of value in array 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =