js将数字分割成数组
2021-11-17 本文已影响0人
轩辕夜空
let sNumber = this.datas.toString()
var data = []
for (var i = 0, len = sNumber.length; i < len; i += 1) {
data.push(+sNumber.charAt(i))
}
let sNumber = this.datas.toString()
var data = []
for (var i = 0, len = sNumber.length; i < len; i += 1) {
data.push(+sNumber.charAt(i))
}