javascript 这段代码不能正常工作[重复]

qnyhuwrf  于 2023-06-04  发布在  Java
关注(0)|答案(1)|浏览(236)

此问题已在此处有答案

What is the difference between the = and == operators and what is ===? (Single, double, and triple equals)(5个答案)
2天前关闭。
一段代码没有正确地执行它被告知要执行的操作。
所以当我输入这段代码时:

var input = readBoolean("please say true or false: ");
var input2 = readBoolean("confirm your selection of " + input)
if(input2 = input){
    if(input2 = false){
        println("you put false");
    }
    if(input2 = true){
        println("you put true")
    }
}

当我用false回答两个布尔值时,它仍然不会输出“you put false”。

相关问题