You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
279 B
JavaScript
8 lines
279 B
JavaScript
5 years ago
|
is_string = function(input) {
|
||
|
if (Object.prototype.toString.call(input) === '[object String]')
|
||
|
return true;
|
||
|
else
|
||
|
return false;
|
||
|
};
|
||
|
console.log(is_string('w3resource'));
|
||
|
console.log(is_string([1, 2, 4, 0]));
|