未验证 提交 35b0c26e 编写于 作者: J jiangkai43 提交者: Gitee

修改foreach示例代码

Signed-off-by: Njiangkai43 <jiangkai43@huawei.com>
上级 5469d425
...@@ -669,9 +669,9 @@ forEach(callbackFn: (value: string, key: string, searchParams: this) => void, th ...@@ -669,9 +669,9 @@ forEach(callbackFn: (value: string, key: string, searchParams: this) => void, th
**示例:** **示例:**
```js ```js
const myURLObject = Url.URL.parseURL('https://developer.exampleUrl/?fod=1&bard=2'); const myURLObject = new Url.URL('https://developer.exampleUrl/?fod=1&bard=2');
myURLObject.params.forEach((value, name, searchParams) => { myURLObject.searchParams.forEach((value, name, searchParams) => {
console.log(name, value, myURLObject.params === searchParams); console.log(name, value, myURLObject.searchParams === searchParams);
}); });
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册