二、将字符串的英文逗号转中文逗号

460 阅读1分钟
/**
@param{string} text 
@returns {string}
*/
function setChinese(text){
    let newText = ''
    for (let i = 0; i < text.length; i++) {
        newText = newText+text.charAt(i).replace(","",")
    }
    return newText
}