Step 40 states that:
“First, create the global variables
openDoor2 , and
openDoor3 but do not assign any value to them globally. They’ll be assigned values within your
But it’s not valid to create const without assigning a value according to what I’ve read:
const variables must be assigned a value when they are declared” https://www.w3schools.com/js/js_const.asp
Well, seeing that they will be assigned values by the
randomChoreDoorGenerator() tells you what type of variable to use. Certainly not
const since they cannot be reassigned.
So what type should you use?
Ah right! I’ll use
let then. Looked too much into previous steps where it was
const all the way up until now.
Glad I could help. Just teach yourself to with each variable think about what its application is and adjust the type accordingly.