📌  相关文章
📜  将字符串转换为数组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:34.443000             🧑  作者: Mango

代码示例6
var fruits = 'apple, orange, pear, banana, raspberry, peach';
var ar = fruits.split(', '); // split string on comma space
console.log( ar );
// [ "apple", "orange", "pear", "banana", "raspberry", "peach" ]