CSS筆記- 運算優先順序
運算順序
先運算完再指定
i = 1
//賦值
i += 1
// i = i+1
-=
// i = i-1
/=
// i = i /
*=
//i = i*
%=
//餘數
等號位置的差異
let i = 1, b
b = i--
//b = 1 , i = 0
//先執行b=i,再執行i = i-1
b = --i
//先執行i = i-1 再執行z=i
// b = 0, i = 0
const a = 1 + 2 * 3
2*3
1+6
賦予值給a
1>2>3 //false
1>2 //false
2>3 => false>3 =>false
3<2<1 //true
3<2 =>false
false<1 => 0<1==>ture
Comments