SOURCE

let a = "测试,中文,标签,哈哈,"
a = a.replace(/,/g, ",").split(",").filter(item=>item)
console.log(a)
console.log(a.length)
console 命令行工具 X clear

                    
>
console