UNPKG
know-alittle-utils
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
略懂略懂的一个node的练习项目
know-alittle-utils
/
utils
/
know-array.js
12 lines
(11 loc)
•
293 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
// 合并数组,传入参数为数组,将数据全部合并
function
knowConcat
(
...args
) {
let
flatArray; flatArray = args.
flat
();
console
.
log
(
'合并后的数组为:'
, flatArray);
return
flatArray; }
// knowConcat([12], [21], [57]);
module
.
exports
= { knowConcat }