前端筆試題
1、有關輸出的
console.log(Array.isArray(Array.prototype)); // true Array.prototype 本身也是一個 Array。 console.log(Array.isArray(Person.prototype)); //false Person.prototype是一個對象
let a =['1','2','3'].map(parseInt) console.log(a); //[1, NaN, NaN] //上面的代碼實際上等于: ['1','2','3'].map(parseInt(val,index)) //parseInt(string, radix) 的參數radix必須介于2~36之間,而且字符串string中的數字不能大于radix才能正確返回數字結果值。 //parseInt('1',0) = 1, //parseInt('2',1) = NaN, //parseInt('3',2) = NaN,

浙公網安備 33010602011771號