I have two array:
let myArray1 = [1, 2, 3];
let myArray2 = [9, 5, 6];
I try to merge the two array and save to a new array using push. I am aware that I can easily do it with concat. But I want to understand more about the code.
let myArray1 = [1, 2, 3];
let myArray2 = [9, 5, 6];
let myArray3 = myArray1.push(myArray2); // Result 4
I don't understand why it is 4 for the output?