Chore Door Step 45, Unexpected token ';'

It says I have an unexpected token after my openDoor variables, but I cannot figure out why. It’s the group of openDoor1, openDoor2, openDoor3, and it’s preventing me from being able to click on the doors and have them randomly generated. Maybe it’s because I placed them incorrectly in the code? It said to place them AFTER the global variables, so that was my best shot. Thanks in advance.

let doorImage1 = document.getElementById("door1");
let doorImage2 = document.getElementById("door2");
let doorImage3 = document.getElementById("door3");

let botDoorPath = "https://content.codecademy.com/projects/chore-door/images/robot.svg";
let beachDoorPath = "https://content.codecademy.com/projects/chore-door/images/beach.svg";
let spaceDoorPath = "https://content.codecademy.com/projects/chore-door/images/space.svg";

let openDoor1 = ;
let openDoor2 = ;
let openDoor3 = ;

doorImage1.onclick = () => {
  doorImage1.src = openDoor1;
};
doorImage2.onclick = () => {
  doorImage2.src = openDoor2;
};
doorImage3.onclick = () => {
  doorImage3.src = openDoor3;
};

let numClosedDoors = 3;

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

randomChoreDoorGenerator();

here:


let openDoor1 = ;
let openDoor2 = ;
let openDoor3 = ;

when you use the assignment operator (=), you have to assign a value. So either: assign a value (This can even be undefined) or don’t use the assignment operator

ohhh, so i ought to simply be doing

let openDoor1 ;

to assign undefined, i can just write undefined?

you can do:

let openDoor1;
// or:
let openDoor1 = undefined;

the latter is more explicit, but doesn’t add much (if any) value in my opinion.

According to mdn documentation:

The global undefined property represents the primitive value undefined . It is one of JavaScript’s primitive types.