js 将字符串分割为数组

js 将字符串分割为数组 split()

 let str = '1,2,3,5,74,7,8'
 
 console.log(str.split(','))

 // 输出 ["1", "2", "3", "5", "74", "7", "8"]

你可能感兴趣的:(js,Vue,node,js)