Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18000
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2013-01-07 02:02 -0800 |
| Message-ID | <91b7a4ff-8eb7-4ef2-ac97-4e046024d5f0@googlegroups.com> (permalink) |
| Subject | Function definition expression has a length property? |
| From | Thomas Li <cooooooder@gmail.com> |
Why function definition expression has a "length" property and its value is always 1?
like:
var square = function(x){return x*x;};
square.length
log value from IE9 javascript console:
>> var square = function(x){return x*x;};
>> square(12)
144
>> square.length
1
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Function definition expression has a length property? Thomas Li <cooooooder@gmail.com> - 2013-01-07 02:02 -0800
Re: Function definition expression has a length property? Stefan Weiss <krewecherl@gmail.com> - 2013-01-07 11:26 +0100
Re: Function definition expression has a length property? Thomas Li <cooooooder@gmail.com> - 2013-01-07 21:49 -0800
csiph-web