提交 6b4401df 编写于 作者: G Gloria

update docs against 9050

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 a3104368
......@@ -491,7 +491,7 @@ plainArray.forEach((value, index) => {
[Symbol.iterator]\(): IterableIterator&lt;[number, T]&gt;
Obtains an iterator, each item of which is a JavaScript object.
Obtains an iterator object that contains key-value pairs, where the key is of the number type.
**System capability**: SystemCapability.Utils.Lang
......@@ -510,7 +510,7 @@ plainArray.add(2, "sffdfhf");
// Method 1:
for (let item of plainArray) {
console.log("index:" + item[0]);
console.log("key:" + item[0]);
console.log("value:" + item[1]);
}
......@@ -518,7 +518,7 @@ for (let item of plainArray) {
let iter = plainArray[Symbol.iterator]();
let temp = iter.next().value;
while(temp != undefined) {
console.log("index:" + temp[0]);
console.log("key:" + temp[0]);
console.log("value:" + temp[1]);
temp = iter.next().value;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册