字符串转换为数组的4 个方法

const text = "abc";
const chars = text.split('');
console.log(chars);
//['a', 'b', 'c']

 

https://blog.csdn.net/lgno2/article/details/118837249

posted @ 2022-04-02 10:23  前端路远且长  阅读(1415)  评论(0)    收藏  举报