I wanted to know what happens if I push the value of an array inside the same array. I did it and there were no errors nor any problems. It just returned an array which has the same array inside that and so on...
I understand that array is passed through references but the pointer to the array still must take some memory.
So how deep does it go? And how do browsers handle this if they need to do it at all?
let arr = [1, 2, 3];
arr.push(arr);