Why does `Array.length`, `Function.length`, `String.length`, etc return 1?
- by zealoushacker
While teaching my JavaScript class yesterday, my students and I came across some interesting functionality that I thought might be worth capturing in a question and the answer I've come to.
Typing Array.length in the JS console in chrome returns 1.
Likewise, Function.length returns 1. This is important because:
Every function in JavaScript is…