How do I fix this kind of if loop?
I have a couple of these in VXGEJF and I don't know what's wrong, do I need semicolons? Example: function newDoor() { if (keys = 0) { alert("The door is locked. You need the guard's keys.") } else if (keys = 1) { alert("The door is open. What lies beyond? Find out soon...") thanksUserJoshGreig() document.write("<head><style>body {background:#005f77;}h3 {background:#77f500;}#p {background:#050f77;color:#DDFFDD;}</style></head><div id=\"p\"><p>VXGEJF: THE GAME</p><p>More coming soon...</p><br><br><br><br><br><hr><h6>Current Version: Update 1.0.1(fixes) Date finished: 11:14AM Fri, August 14</h6>") keys = 0 } } (All the functions and variables are defined somewhere in the code) It's not that I got what I needed for the one output every time, I just checked. It only ever gives the second output. https://code.sololearn.com/WDVwh0O7oDhI/?ref=app