轉載於 這裡 1 ...
轉載於 這裡
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]; arr.map(String); //結果: ['1', '2', '3', '4', '5', '6', '7', '8', '9'] var a = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] a.map(Number); //結果:[1, 2, 3, 4, 5, 6, 7, 8, 9]
1