확산 연산자를 사용하면 배열을 단일 인수로 분할할 수 있습니다. 이러한 인수는 개별 인수의 기능인 인수입니다.
구문
function myfunction(...iterableObj);
예시
라이브 데모
<html>
<body>
<script>
var a, b, c, d, e, f, g;
a = [10,20];
b = "rank";
c = [30, "points"];
d = "run"
// concat method.
e = a.concat(b, c, d);
// spread operator
f = [...a, b, ...c, d];
document.write(e);
document.write("<br>"+f);
</script>
</body>
</html>