<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>新建网页</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="description" content="布尔教育 http://www.itbool.com" /> </head> <body> <script> //js中拼接运算符 “ + ” console.log(2 + 3); console.log('hello' + ' ' +'world'); console.log(2 + 3 +'haha' + 5 + 6);//一旦碰到非法数字运算后,后面一律理解为“拼接”。 //js中,逻辑运算符,返回的是最早判断表达式的那个值。 var a = false; var b = 6; var c = true; var d = (a || b || c ); console.log(d); var e = false; var f = 99; console.log(e && f); //window.hello = window.hello || window.world; if else判断 </script> </body> </html>

我的微信
这是我的微信扫一扫