var x = [];
x.push(x);
x
now seems to be an infinitely deep russian-doll type meta array.
if you check x[0][0][0]
.... as many [0]
indexes as you add, it still returns a one-item array.
but is there a finite depth cutoff? or are new levels procedurally generated when you check? those are the only two possibilities I can think of.
var x = [];
x.push(x);
x now seems to be an infinitely deep russian-doll type meta array.
Not really. x
is an array. The first element in the array points to the same memory location as x
itself. Nothing more, nothing less.
But yes, you can do
x[0][0][0]
as many times as you like, since you're just re-referencing the same memory location over and over again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With