TypeScript笔记五
/** * Created by ufo9631 on 2017/5/17. */ var myArr=[1,2,3,4,5]; myArr.desc="five number"; myArr.forEach(value=>console.log(value)); //forEach不能使用break for(var n in myArr) { console.log(n); } for(var x of myArr) { console.log(x); }
/** * Created by ufo9631 on 2017/5/17. */ var myArr=[1,2,3,4,5]; myArr.desc="five number"; myArr.forEach(value=>console.log(value)); //forEach不能使用break for(var n in myArr) { console.log(n); } for(var x of myArr) { console.log(x); }