es6语句

一、if语句

if (condition)

{}

else if(condition2)

{}

else

{}

二、迭代语句

do

{}

while(expression)

while(expression)

{statement}

for(initialization;expression;post-loop)

{statement}

for (porperty) in (expression)

{statement}

三、标签语句

label:statement

四、break,continue

标签语句可以和多层的循环的break和continue配合使用

五、with

with语句设置代码在特定对象的作用域

with 语句是运行缓慢的代码块,尤其是在已设置了属性值时。大多数情况下,如果可能,最好避免使用它

六、switch

switch(expression)

case value:statement;

break;

case value:statement;

break

default:statement

 

posted @ 2018-07-19 18:47  tutu_python  阅读(121)  评论(0)    收藏  举报