[Javascript] Argument 와 spread 연산자(...)
Argument arguments is an Array-like object accessible inside functions that contains the values of the arguments passed to that function. - MDN 함수의 인자값이 거기서 거기지 뭐 그리 특별할게 있나 생각할 수 있는데, 다른 프로그래밍 언어 대비, 독특한 특성에 대해 나열해 보겠습니다. 1. 항상 옵셔널 합니다. function SayHi(a,b){ console.log('Hi ',a,b); } SayHi() // Hi undefined undefined 선언 시, 파라미터를 지정해 줘도, 호출 시, 사용여부는 사용자에게 달려있습니다. 단, 호출 시, 인수를 제공하지 않더라도, 선언된 파라미터에..