let phone = "[123,323,345]"
let arr = phone.split(",")
let arr2 = []
arr.forEach((item, index) => {
if (index == 0) {
//去除字符串的第一个字符
item = item.slice(1, item.length)
console.log(item)
} else if (index == arr.length - 1) {
//去除字符串的最后一个字符
item = item.slice(0, item.length - 1)
console.log(item)
}
console.log(item)
arr2.push(item)
})
console.log(arr2)