player.shot[i].splice(i,1);I check each player shot each time the game loops and it checks one property of that shot, which no longer exists and get this error message when I view the dev console: "Uncaught TypeError: Cannot read property 'dir' of undefined"
dir being the direction the shot was going before it was spliced.
The game keeps working, but every shot eventually triggers one of these error messages in the console. The reason I splice them is to help prevent memory leakage. Should I even worry about this or what?