Chore Door Javascript Project


I am unable to get the ‘Game over! Play again?’ response in this project. I believe that I have it correctly defined in the playDoor() function.
When I check console I find a reference error that door is not defined in line 35. My understanding is that door is an argument to the isBot() function. However, I have to admit I don’t understand the ‘door.src =…’ in line 16 and do not understand how door should be defined here.

Also I tried to copy and paste the files from this project into visual studio code, but I couldn’t run the debugging - I receive an alert ‘cannot find runtime ‘node’ on PATH. Is node installed?’.

Any help appreciated.