标签:doctype bsp har pre 输出 class result 逻辑 meta
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Title</title> 6 </head> 7 <body> 8 <script> 9 //逻辑与(&&) 10 //关联两个条件,两个条件都为真的时候,那么整个表达式的结果才为真 11 //语法: 12 // 条件1&&条件2 13 //问题:判断考试分数是否在60-80之间 14 var score=52; 15 //条件1:score>=60; 16 //条件2:score<=80; 17 var result=score>=60 && score<=80; 18 console.log(result); 19 //输出结果为 false 20 </script> 21 </body> 22 </html>
标签:doctype bsp har pre 输出 class result 逻辑 meta
原文地址:http://www.cnblogs.com/longly/p/6079021.html