Chore Door Step 10, door won't open!

I’m on the Chore Door exercise (https://www.codecademy.com/paths/web-development/tracks/build-interactive-websites/modules/web-dev-interactive-websites/projects/chore-door) and seem to be running into a problem several others have also had, my first chore door won’t open!

Maybe it’s just a syntax error somewhere that I haven’t seen, but I’ve looked over each line quite closely and can’t see any.

Also, should my tag be going before my tag like the instructions of the exercise say, or after? (I have tried both and neither solved my problem).

My JS code:

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

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

let doorImage1.onclick = () => {
  doorImage1.src = botDoorPath;
};

HTML:

<!DOCTYPE html>
<html>
  <head>
    <title>Chore Door!</title>
    <link href="./style.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Work+Sans" rel="stylesheet" type="text/css">
  </head>

  <body>
    <div class='door-row'>
      <img id='door1' src='https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/closed_door.svg'>
    </div>
    <script type="text/javascript" src="script.js"></script>
  </body>
</html>

CSS:

body {
  background-color: #010165;
  margin: 0px;
}

#door1 {
  cursor: pointer;
}

I am so silly!

I realized my error is on line 5, where I used “let” in my function declaration.