JS的常用方法
js中字符串常用方法总结_15种常见js字符串用法_<a href="#">leo</a>的博客-CSDN博客
javascript
<script>
var str="heool"
console.log(str.length);
console.log(str.concat(" lyt"));
console.log(str.includes("he"));
var phone="153884099001";
console.log(phone.match(/^(0|86|17951)?(13[0-9]|15[012356789]|166|17[3678]|18[0-9]|14[57])[0-9]{8}$/));
var ls="2033 03 05"
console.log(ls.replaceAll(" ", "-"));
console.log(str.substring(1, 3));
</script>