js操作方法都不会改变原字符串,字符串第一位索引是0,最后一位索引是-1 1.split(separator, howmany) 用于把一个字符串分割成数组。 let str2 = "23:34:56:78"; let arrS1 = str2.split(":", 3) // ["23