I've come across an issue where I save "items" the player finds in an array by pushing it back on the x axis and adding the "itemname" (I do it this way in order to sort the array and call a list of each item you have).
However, if you do multiple saves, or loads, or new games, (which clear the array, and then load it via localstorage) clearing the array resets it, but when you go to make a list of the necessary items, it stays at whatever size it was before. I thought maybe I could delete the array, but that just removed it from the game entirely and made it so you could no longer use it. I've noticed there's no manual representation of what destroying an array does (OR dictionary, for that matter)
It's quite clear to stay away from arrays for anything that plays with size, so I'll have to figure out another way to go about it.