如何将字符串转换为首字母大写?

function normalize(arr) {
    return arr.map(s => {
        return s[0].toUpperCase() + s.slice(1).toLocaleLowerCase()
    });
}