多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## 控制流程语句 大 ### if ``` if (isRaining()) { you.bringRainCoat(); } else if (isSnowing()) { you.wearJacket(); } else { car.putTopDown(); } ``` ### for 循环 ``` for (var i = 0; i < 5; i++) { ... } ``` 迭代 ``` var collection = [0, 1, 2]; for (var x in collection) { print(x); // 0 1 2 } ``` ### switch ``` var command = 'OPEN'; switch (command) { case 'CLOSED': executeClosed(); break; case 'PENDING': executePending(); break; default: executeUnknown(); } ```