//create an array like so: var colors = ["red","blue","green"]; //you can loop through an array like this: for (var i = 0; i < colors.length; i++) { console.log(colors[i]); }
const clothing = ['shoes', 'shirts', 'socks', 'sweaters']; console.log(clothing.length); // expected output: 4
console.log(Array.from('foo')); // expected output: Array ["f", "o", "o"] console.log(Array.from([1, 2, 3], x => x + x)); // expected output: Array [2, 4, 6]
var array = []
Array.from("Hello"); // ["H", "e", "l", "l", "o"]