The browser storage localStorage is not available. Either your browser does not support it or you have disabled it or the maximum memory size is exceeded. Without localStorage your solutions will not be stored.

Array: concat()

Using the concat method you can concatenate two arrays:
var a1 = [1, 2, 3];
var a2 = [4, 5, 6];
var a3 = a1.concat(a2);
a3 contains the array [1, 2, 3, 4, 5, 6]. The two existing arrays a1 and a2 will not be changed.


Write a function concatUp that concatenate two arrays. The longer array should be appended to the shorter array. If both arrays are equally long, the second array should be appended to the first array. concatUp([1, 2], [3]) should return [3, 1, 2] and concatUp([5, 7], [6, 8]) should return [5, 7, 6, 8].