TypeScript笔记四

/**
 * Created by ufo9631 on 2017/5/17.
 */
var myArr = [1, 2, 3, 4, 5];
myArr.desc = "five number";
myArr.forEach(function (value) { return console.log(value); }); //forEach不能使用break
for (var n in myArr) {
    console.log(n);
}
for (var _i = 0, myArr_1 = myArr; _i < myArr_1.length; _i++) {
    var x = myArr_1[_i];
    console.log(x);
}
//# sourceMappingURL=ts5.js.map

  

posted @ 2017-11-15 22:50  编程猴子  阅读(114)  评论(0编辑  收藏  举报