📜  javascript 数组 codeburst - Javascript 代码示例

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

代码示例1
var elements = ['Task 1', 'Task 2', 'Task 3'];console.log(elements.join());// expected output: Task 1,Task 2,Task 3console.log(elements.join(''));// expected output: Task 1Task 2Task3console.log(elements.join('-'));// expected output: Task 1-Task 2-Task 3