⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 if-else.js

📁 这是《JavaScript学习源代码》一书的源代码
💻 JS
字号:
var num = 2, bool = false;
// is the number 1 and the boolean value true ?
if(num == 1 && bool == 1)  alert("TEST1 bool: " + bool);
else
// is the number 2 and the boolean value true ?
if(num == 2 && bool == 1)  alert("TEST2 bool: " + bool);
else
// is the number 2 and the boolean value false ?
if(num == 2 && bool == 0)  alert("TEST3 bool: " + bool);
else
// is the number 3 and the boolean value false ?
if(num == 3 && bool == 0)  alert("TEST4 bool: " + bool);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -