十五.字符串翻转

45 阅读1分钟

let str = 'hello'// ['h','e','l','l','o'] // 先转换成数组,然后翻转,然后变回字符串 console.log(str.split('').reverse().join(''));