提交 071c91a3 编写于 作者: C coollixin

fixed 4ebb1c5d from https://gitee.com/coollixin/docs/pulls/23679

arkTs arraylist整改
Signed-off-by: Ncoollixin <lixin581@huawei.com>
上级 543b924b
......@@ -799,12 +799,12 @@ arrayList.add(4);
// 使用方法一:
let numbers: Array<number> = arrayList.convertToArray()
for (let item of numbers) {
console.log(`hyq value : ${item}`);
console.log(`value : ${item}`);
}
// 使用方法二:
let iter = arrayList[Symbol.iterator]();
let temp = iter.next();
let temp: IteratorResult<number> = iter.next().value;
while(!temp.done) {
console.log(`value:${temp.value}`);
temp = iter.next();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册