Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
함수 인스턴스의 length 데이터 속성은 함수가 기대하는 인자의 수를 나타냅니다.
숫자
| 쓰기 가능 | 불가능 |
| 열거 가능 | 불가능 |
| 설정 가능 | 가능 |
length는 함수 객체의 속성으로, 함수가 얼마나 많은 인수를 기대하는지 나타냅니다, 즉 형식 매개변수의 수. 이 수는 나머지 매개변수를 포함하지 않습니다. 그에 반해, arguments.length는 함수에 지역(local)이고 실제로 함수에 전달된 인수의 수를 제공합니다.
Function 객체의 length 속성은 함수가 얼마나 많은 인수를 기대하는지 나타냅니다. 이는 형식 매개변수의 수 입니다. 이 숫자는 나머지 매개변수를 포함하지 않으며 기본 값을 가진 첫 번째 매개변수 이전의 매개 변수만 포함합니다. 반면 arguments.length는 하나의 함수에 국한되어 실제로 함수에 전달된 인수의 수를 제공합니다.
Function 생성자는 그 자체로 function 객체입니다. 그 length 데이터 속성은 값이 1입니다.
역사적인 이유로 인해 Function.prototype은 호출 가능한 자체입니다. Function.prototype의 length속성 값은 0입니다.
| ECMAScript® 2027 Language Specification # sec-function-instances-length |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 2월 11일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.