input = window.prompt()
x = true
if (input.includes("stop working")) {
if (x = true) {
console.log("not working")
}
x = false
}
if (x = true) {
console.log("working")
}
Theoretically, when I enter stop working
into the window prompt, it shouldn't log working
, but when I enter stop working
it logs not working
and then working
even though x
is false
and it should only log working
when it is true.(从理论上讲,当我在窗口提示中输入“ stop working
”时,它不应记录为working
,但是当我输入“ stop working
,即使x
为false
,它也记录为not working
,然后仍working
,并且仅当它为true时才记录working
。)
ask by Emusaurus translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…