JavaScript bestimmen Array -Typ
var data = ['a', 'b', 'c']
var isArray = Array.isArray(data)
console.log(isArray)
Ntiyiso-Rikhotso
var data = ['a', 'b', 'c']
var isArray = Array.isArray(data)
console.log(isArray)
var colors=["red","green","blue"];
if(Array.isArray(colors)){
//colors is an array
}
Array.isArray(arr)
Array.isArray([1, 2, 3]); // true
Array.isArray('asdf'); // false
const array = [ 'this', 'is', 'an', 'array' ];
console.log(typeof array); //object
Array.isArray([1, 2, 3]); // true