摘要: let str = 'abcde';// 截取字符串slice(start, end) // 截取字符串,从 start 位置开始到 end-1 位置(左闭右开取中间) console.log(str.slice(1, 3)); // 'bc'charAt(n) // 截取一个长度为1的字符串,n 字符串下标,表示截取 n 位置上的字符串 console.lo... 阅读全文
posted @ 2017-10-22 23:46 Joffy 阅读(135) 评论(0) 推荐(0) 编辑