1var ar = ["apple","banana","canaple"];
2var bar = Array.from(ar);
3alert(bar[1]); // alerts 'banana'
4
5// Notes: this is for in In ES6, works for an object of arrays too!
1var array1 = ['Hamburger', 'Fries']
2var array2 = ['Salad', 'Fruits']
3
4var combinedArray = array1.concat(array2); // => ['Hamburger', 'Fries', 'Salad', 'Fruits']
1const array1 = ['a', 'b', 'c'];
2const array2 = ['d', 'e', 'f'];
3const array3 = array1.concat(array2);
4
5console.log(array3);
6// expected output: Array ["a", "b", "c", "d", "e", "f"]