1var data = ['a', 'b', 'c']
2var isArray = Array.isArray(data)
3console.log(isArray)
1var colors=["red","green","blue"];
2
3if(Array.isArray(colors)){
4 //colors is an array
5}
1 const array = [ 'this', 'is', 'an', 'array' ];
2 console.log(typeof array); //object