JS::가변인자함수

JavaScript

// 함수를 생성합니다.

function sumAll(){
	
  // 출력합니다.
  document.write( typeof (arguments) + ':' + arguments.length);

	//arguments ( <= 배개변수. 보통 arguments.lenth로 갯수를 알아볼 때 사용)
}

// 함수를 호출합니다.
sumAll(1,2,3,4,5);