7 lines
213 B
JavaScript
7 lines
213 B
JavaScript
is_array = function(input) {
|
|
if (toString.call(input) === "[object Array]")
|
|
return true;
|
|
return false;
|
|
};
|
|
console.log(is_array('w3resource'));
|
|
console.log(is_array([1, 2, 4, 0]));
|