随笔 - 2146  文章 - 97 评论 - 11767 trackbacks - 253


if (..) { ... } 
else if (..) { ... } 
else { ... }


switch (..) {
  case A: ... break;
  case B: ... break;
  case C: ... break;
  default: ... break;
}


while (..) { ... } 

do ... while (..);

for (i=0; i<10; i++) { ... }

for (v in x) { ... }

//循环中可包含:
continue;
break;
break LabelName;


with (..) { ... }


throw new Error('异常');

try { ... }
catch { ... }
finally { ... }


运算符优先级:

15. [] () new
14++ -- - + ~ ! delete typeof void
13* / %
12+ -
11<< >> >>>
10< <= < >= instanceof in
9== != === !==
8&
7^
6|
5&&
4||
3?:
2= *= /= %= += -= <<= >>= >>>= &= ^= |=
1,


posted on 2009-03-04 21:42  万一  阅读(...)  评论(...编辑  收藏