摘要: 1.功能介绍 slice() 方法提取某个字符串的一部分,并返回一个新的字符串,且不会改动原字符串。 2.基本使用 str.slice(beginIndex[, endIndex]),返回的字符串不包含endIndex下标所在字符。 const str = 'abcdefg' console.log 阅读全文
posted @ 2020-10-17 10:54 热心码农小吕 阅读(180) 评论(0) 推荐(0) 编辑