-----------------------------------------------------------
var han = 1;
if (0 < han--) {//会执行
alert(han); //han-- 先比较后计算
}
-----------------------------------------------------------
var han = 1;
if (0 < --han) {//不会执行
alert(han); //--han 先计算后比较
}
-----------------------------------------------------------
var a1=1,a2=2,a3=3;
-----------------------------------------------------------
var inum1 = 2;
var inum2 = 20;
var inum3 = --inum1 + ++inum2; //outputs 22 表达式 1+21
var inum4 = inum1 + inum2; //outputs 22 表达式 1+21
alert(inum3)
alert(inum4)
------------------------------------------------------------
var inum1 = 2;
var inum2 = 20;
var inum3 = inum1-- + inum2++; //outputs 22 表达式 2+20
var inum4 = inum1 + inum2; //outputs 22 表达式 1+21
alert(inum3)
alert(inum4)
-----------------------------------------------------------
var inum1 = 2;
inum1 = +inum1;//正数
alert(inum1) //outputs 2
var inum1 = 2;
inum1 = -inum1;//负数
alert(inum1) //outputs -2
----------------------------------------------------------
var inum1 = "Brick" < "alphabet"; //B字符代码“66”,a字符代码“97”
alert(inum1) //outputs true
------------------------------------------------------
var inum1 = "Brick".toLowerCase() < "alphabet".toLowerCase(); //B字符代码“66”,a字符代码“97”
alert(inum1) //outputs false
------------------------------------------------------
var inum1 = "23" < 3; //"23"被转换为23与进行比较
alert(inum1) //outputs false
--------------------------------------------
var inum1 = "55";
var inum2 = 55;
alert(inum1 == inum2) //outputs true "55"自动转换为55
alert(inum1 === inum2) //outputs false 比较内容与类型