/***** 截取字符串的一段,原字符串不变:slice *****/
var str = '0123456789';console.log(str.slice(2,5));
234
/***** 截取字符串的一段,原字符串不变:substr *****/
var str = '0123456789';console.log(str.substr(2,5));
23456
/***** 字符串转数组,原字符串不变:split *****/
var str = '0,1,2,3,4,5,6,7,8,9';console.log(str.split(','));
["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]