8 lines
202 B
JavaScript
8 lines
202 B
JavaScript
|
|
// 将数组中的所有元素按下标顺序拼接成字符串
|
||
|
|
module.exports = (arr) => {
|
||
|
|
let total = '';
|
||
|
|
arr.forEach(element => {
|
||
|
|
total = total + element;
|
||
|
|
});
|
||
|
|
return total;
|
||
|
|
};
|