提交 6fe062bf 编写于 作者: 杜庆泉's avatar 杜庆泉

Update map.md

上级 6343a7bb
......@@ -80,6 +80,18 @@ console.log(map1.has('bar'));
<!-- UTSJSON.Map.forEach.compatibility -->
```ts
let mapObj = new Map<string,any>()
mapObj.put("name","zhangsan")
mapObj.put("age",12)
// 需要特别注意迭代方法的第一个参数是value.第二个是key.
mapObj.forEach(function(value:any,key:string){
console.log(key)
console.log(value)
})
```
### get(key)
<!-- UTSJSON.Map.get.description -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册