aaliyah403 posted a year ago
chris posted a year ago
Best Reply

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

Sign In

Providing the lift to launch your development career

© 2023 Chris Courses. All rights reserved.