<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
//字符串连接符+
document.write('hello'+' maizi '+'<br/>');
document.write(1+'king'+'<br/>');
var i=1,j=2,z=3;
document.write(''+i+j+z);
document.write('<br/>');
//赋值运算符的例子
var username='king';
document.write('用户名为:'+username+'<br/>');
//+= -= *= /= %= .=
var a=1;
a+=3;//a=a+3;
// alert(a);
a-=6;
a*=8;
a/=4;
a%=9;
document.write(a);
document.write('<br/>');
var str1=' hello ',str2=' world ';
str2+=str1;//str2=str2+str1;
document.write(str2);
//比较运算符的例子
// alert(3>1);
// alert(3>=1);
// alert(3<=12);
// alert(3<2);
var res=1==true;
res=1=='1';
res=3=='3king';
res=0==null;//false
res=0!=null;
res=1===true;
res=1!==true;
// alert(res);
// alert(NaN==NaN);//false
alert(undefined==undefined);
</script>
</body>
</html>