CurryingFunctions (1/18)
What is this length property of a function?
    • The length data property of a function represents the total number of arguments that the function expects.
    • This number excludes the rest parameters and only includes parameters before the first one with a default value.
    • By contrast, arguments.length is local to a function and provides the number of arguments actually passed to the function.
    • exampleFunction has three parameters (a, b, c), so its length property is 3.
    • anotherFunction has one regular parameter (x), one parameter with a default value (y = 5), and a rest parameter (...rest). The length property only counts the parameters before the first parameter with a default value, so the value is 1.