# JavaScript 关键字

JavaScript 关键字用于标识要执行的操作。

abstract boolean break byte case catch char
class const continue debugger default delete do
double else enum export extends false final
finally float for function goto if implements
import in instanceof int interface let long
native new null package private protected public
return short static super switch synchronized this
throw throws transient true try var void
volatile while with

# JavaScript 语句标识符

JanaScript 语句通常以一个语句标识符为开始,并执行该语句. 语句标识符是保留关键字不能作为变量名使用。

语句描述
break用于跳出循环;
catch语句块,在try语句块执行出错时执行catch语句块;
continue跳过循环中的一个迭代;
do...while执行一个语句块,在条件语句为true时继续执行该语句块;
for在条件语句为true时,可以将代码块执行指定的次数;
for...in用于遍历数组或者对象的属性(对数组或者对象的属性进行循环操作);
function定义一个函数;
if...else用于基于不同的条件来执行不同的动作;
retrn退出函数;
switch用于基于不同的条件来执行不同的动作;
throw抛出(生成)错误;
try实现错误处理,与catch一同使用;
var声明一个变量;
while当条件语句为true时,执行语句块。