var res = ['2', '10', '11'].map(v => +v ); document.write('<pre>' + JSON.stringify(res, null, 3) + '<pre