📄 logical.js
字号:
var a = true; //set two boolean values
var b = false;
var result = "a = " + a + " b = " + b; //store the current values
var both_test = ( a && b ); // test if both operands are true
result += "\n\nAre both values true? = " + both_test; //store the result
var either_test = ( a || b ); // test if either operand is true
result += "\n\nIs either value true? = " + either_test; //store the result
a = !a ; // toggle both stored values
b = !b;
result += "\n\na = " + a + " b = " + b; //store the current values
alert( result ); //display the stored info
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -