获取指定位置的字符 charAt(index)
'abc'.charAt(1) // b
循环字符串 for of
for(let item of 'abc') {console.log(item)} // a b c
截取字符串长度slice
'a.bcdef'.slice(0,4) //'a.bc'
// 反向截取
'a.bcdef'.slice(0,-4) // 'a.b'
substr截取字符串
let a = '0123456'
a.substr(1,5) // 12345
console.log(a) // 0123456不会改变原数据