Js中Map获取数据undefined的解决方法
在js中的Map对象通过set方法将数据保存在Map对象中,但是在用get方法获取时得到的是undefined类型。这是因为set的是number类型的数据,想要get出来数据,正确的方法
map.get(parseInt(num))
Reproduced please indicate the author and the source, and error a link to this page.
text link:
//v2ci.com/51.html