JS native code interview questions

What is the value of ['1','2','3'].map(parseInt)? why?

Analysis :
parseInt syntax: accepts two parameters by default, the first parameter is the array element, the second is the current element index
Insert picture description here

Insert picture description here

Among the parameters accepted by parseInt,

answer:[1,NaN,NaN]

Guess you like

Origin blog.csdn.net/weixin_51198863/article/details/113797194