javascript apply() 메서드는 call() 메서드와 동일하지만 함수 매개 변수를 배열로 간주합니다. 다음 코드를 실행하여 JavaScript에서 apply() 메서드를 구현하는 방법을 배울 수 있습니다. -
예시
<html>
<head>
<script>
document.write("The highest number in the array list: ");
document.write(Math.max.apply(null,[50,90,18, 87]));
document
</script>
</head>
<body>
</body>
</html>
출력
The highest number in the array list: 90