Double check that you only have one instance of a player
const or let. It might be located in a different file if you're pulling in multiple script tags.
As long as there's only one const player = new Player()
your error will go away.
If you need to reset it somewhere else separately, define it as a let and set it without a declaration:
let player = new Player()
player = new Player()
Want to participate?
Create a free Chris Courses account to begin