1//create an new function that can be used by any array
2Array.prototype.second = function() {
3 return this[1];
4};
5
6var myArray = ["item1","item2","item3"];
7console.log(myArray.second());//returns 'item2'
1// To merge two or more arrays you shuld use concat() method.
2
3const array1 = ['a', 'b', 'c'];
4const array2 = ['d', 'e', 'f'];
5const array3 = array1.concat(array2);
6
7console.log(array3);
8// expected output: Array ["a", "b", "c", "d", "e", "f"]