I saw these code lines in cryptozombies.io:
uint id = zombies.push(Zombie(_name, _dna)) - 1; zombieToOwner[id] = msg.sender;
I wouldn't have had a problem had there not been "- 1" after the push() function. I believe the return value of the push function has something to do with the index of the inserted object. Why is there a "-1"? Is the return value index of the next free spot available to insert the next object in the array?