GuoZheng
Results
2
comments of
GuoZheng
> # 一、what 正确答案 > ```js > ['1', '2', '3'].map(parseInt); // [1,NaN,NaN] > ``` > >  > > # 二、why > ## (一)理解map > ### 1、map概念 > map() 方法创建一个新数组,其结果是该数组中的每个元素都调用一个提供的函数后返回的结果。...
console.log( parseInt(0xaa, 20) ) // 540 这个输出会先把 0xaa 按照十六进制转换为十进制数 170,然后再将 170 按照 20进制 转换 得到 540 console.log( parseInt('aaa', 20) ) // 4210 这个输出会 直接将 aaa 作为20进制解析,a=10, 10 * 20^0 +...