<!DOCTYPE html>
<html lang="utf-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script type="text/javascript">
function MyArrayParam(a, b, c, d)
{// 구브라우져에서 동작 됨
document.write("a값 : " + a);
document.write("</br>");
document.write("b값 : " + b);
document.write("</br>");
document.write("c값 : " + c);
document.write("</br>");
document.write("d값 : " + d);
}
var paramArr = [1, 2, 3, 4];
MyArrayParam.apply(null, paramArr);
</script>
<script type="text/javascript">
function MyArrayParamECMA6(e, f, g, h)
{// 신규 문법
document.write("</br>");
document.write("ECMA6 e값 : " + e);
document.write("</br>");
document.write("ECMA6 f값 : " + f);
document.write("</br>");
document.write("ECMA6 g값 : " + g);
document.write("</br>");
document.write("ECMA6 h값 : " + h);
}
var paramArr2 = [5, 6, 7, 8];
MyArrayParamECMA6(...paramArr2);
</script>
</head>
<body>
</body>
</html>