Chore Door door image isnt loading up


#1

Hey guys so I am on step 57, when I click on the doors the entire door image disappears, I’ll show you guys my code

<div class = "door-row">
        <img id ="door1" class = "door-frame" src = "https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/closed_door.svg">
        <img id ="door2" class = "door-frame" src = "https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/closed_door.svg">
        <img id ="door3" class = "door-frame" src = "https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/closed_door.svg">
    </div>
    <div id = "start" class = "start-row">Good luck!</div>
    <script type= "text/javascript" src = "script.js"></script>`


let doorImage1 = document.getElementById('door1');

let doorImage2 = document.getElementById('door2');

let doorImage3 = document.getElementById('door3');

let startButton = document.getElementById('start');

// file paths
const beachDoorPath = 'https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/beach.svg';

const botDoorPath = 'https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/robot.svg';

const spaceDoorPath = 'https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/space.svg';

doorImage1.onclick = () => {
  	if (!isClicked(doorImage1)) {
  doorImage1.src = openDoor1;
  playDoor();
        }  
}

doorImage2.onclick = () => {
  if (!isClicked(doorImage2)) {
  doorImage2.src = openDoor2;
  playDoor();
        }  
}

doorImage3.onclick = () => {
 if (!isClicked(doorImage3)) {
   doorImage3.src = openDoor3
  playDoor();
			 }
}

const gameOver = (status) => {
 if (status === 'win') {
     	startButton.innerHTML = 'You win! Play again?';
     }
}

let numOfClosedDoors = 3;

let openDoor1 ;
let openDoor2 ;
let openDoor3 ;

let closedDoorPath = 'https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/closed_door.svg';

const isClicked = (door) => {
  
  if (door.src === closedDoorPath) {
     	return false;
   } else {
     return true;
   }
  
};

const playDoor = () => {
  numOfClosedDoors --;
  
  if (numOfClosedDoors === 0) {
      	gameOver('win');
      }
}

const randomChoreDoorGenerator = () => {
  const choreDoor =  Math.floor(Math.random() * numClosedDoors);
  
  if (choreDoor === 0) {
      
    openDoor1 = botDoorPath;
    openDoor2 = spaceDoorPath;
    openDoor3 = beachDoorPath;
    
      } else if (choreDoor === 1) {
      
        openDoor2 = botDoorPath;
        openDoor1 = beachDoorPath;
        openDoor3 = spaceDoorPath;
      }
  
 else  {
      
   openDoor3 = botDoorPath;
   openDoor2 = spaceDoorPath;
   openDoor1 = beachDoorPath;
   
} 
  
}
  
  randomChoreDoorGenerator();


#2
const randomChoreDoorGenerator = () => {
  const choreDoor =  Math.floor(Math.random() * numClosedDoors);  //<---  numClosedDoors should be numOfClosedDoors
  
  if (choreDoor === 0) {
      
    openDoor1 = botDoorPath;
    openDoor2 = spaceDoorPath;
    openDoor3 = beachDoorPath;
    
      } else if (choreDoor === 1) {

numClosedDoors is not defined. Probly just a typo, should be numOfClosedDoors