Something I learned about arrays though I'm not actually sure why it works that way

Apparently
an image where the variable i is being set to a new Array and j is being set to i and i gets a new item called "hi" and then j is outputted in the console; j happens to have the "hi" item in it as well

It also works using [] as well.
And so it appears that the variable i still has the "hi" in it as well.
Pushing an item onto j also adds an item to i.
This doesn't seem to work with numbers:
I'm not sure what's going on but I guess this could be useful one day, I guess.

Comments

Post a Comment

Popular posts from this blog