Chore Door Project - Almost got it, but buggy


I am working on the Chore door project. I am stuck with the doors closing out every time I click a door. Here is the code -

Somewhere I feel that the startOver() function call in the end is misplaced. It seems to be called every time there is an event rather than only when the page is loaded. Although in instructions and the video shows that it should be there.

The code worked till I coded for startButton.onclick function. Then it got a little messy.

Please help

Best Wishes

door1.onclick = () => {

There’s your culprit. That function call should not be inside the event handler for any doors.