Here is a code snippet I created:
var arr = [1,2];
var arr2 = ["a","b","c"];
var newArr = [...arr];
var anotherArr = arr.push(3);
var aloneArr = arr2.push([3]);
console.log(newArr); //[1,2]
console.log(anotherArr); //3
console.log(arr); // [1,2,3]
console.log(aloneArr); // 4
console.log(arr2); //["a","b","c",[3]]
according to the output of the following code, can I have the conclusion that : arr.push(3) will give you the total number of elements inside anotherArr
instead of the end result a.k.a [1,2,3]
same thing goes for aloneArr
it will return the number of elements inside aloneArr
which is now 4
and is the value of arr2
correct? which means I added a single value array inside of arr2