摘要: 1.去除字符串中所有空格 1 let arr = "11 12345 6777 88 9"; 2 const res = arr.replace(/\s*/g, ""); 3 console.log(res); 输出↓ 11123456777889 2.字符串去重 使用ES6以上的新语法,new S 阅读全文
posted @ 2023-01-27 15:34 january-yy 阅读(13) 评论(0) 推荐(0)