wuqilang


  1、forEach遍历:

          map.forEach(function(value,key){
            console.log(value,key);
          });
     函数中第一个参数是属性值,第二个参数是属性

  2、for-of遍历:
        ①for(let item of map){

         }
     遍历结果是数组
        ②for(let item of map.values()){

         }
     遍历属性值
        ③for(let item of map.keys()){

         }
     遍历属性

  3、entries遍历:

        for(let item of map.entries()){

        }
     遍历结果同forEach

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-04-20
  • 2021-09-20
  • 2021-09-20
  • 2021-11-30
  • 2021-11-30
  • 2021-11-30
猜你喜欢
  • 2021-09-20
  • 2021-11-17
  • 2021-09-20
  • 2021-09-20
  • 2019-11-05
  • 2021-09-09
  • 2021-09-20
相关资源
相似解决方案