📜  替换 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:58.705000             🧑  作者: Mango

代码示例6
function spinWords(pw){
    let a = ''
    if(pw.length <= 5){
      a +=pw.split("").reverse()
      console.log(a.replaceAll(',' , ''))
    }else {
      console.log("olá")
    }
}

let hey = "hello";
spinWords(hey) // olleh