TIL: In JavaScript function.length returns the number of arguments it supports

function test(a, b, c)
{

}

alert(test.length);

In this piece of code if you use .length on a function it returns the number of named arguments that this function accepts.

Comments

Popular posts from this blog

The best mobile development platform for hobbyist programmer

Is this finally the year of Linux on the desktop?

Using CONNECT method on a http proxy using telnet