javascript - length property of functions -


i don't understand what's going on here:

$ node > var f = function() {}; > f['length'] = '11'; '11' > f['length'] 0 

if you're not familiar node, code after > typed, , stuff not there returned values. f['length'] == 0.

length property functions number of arguments function expects.

specifies number of arguments expected function.

https://developer.mozilla.org/en/javascript/reference/global_objects/function/length

in case, f doesn't take paramater, length 0.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -