Re: Why is this a closure?



On 12.02.2012 14:10, Jake Jarvis wrote:
On 12.02.2012 13:07, Tom de Neef wrote:
When I run the code below through JSLint, the report says:
Global test
1 test()
Closure compare
...

I thought I had understood the concept of closure:
<snip>

From JSLint's manual

http://www.jslint.com/lint.html#report

| Report
|
| If JSLint is able to complete its scan, it generates a function
| report. It lists for each function:
| ...
| /Closure/: The variables and parameters that are declared in the
| function that are used by its inner functions.


Just to clarify, that is just what JSLint means with that word in the context of its report, it's not a definition for what the word 'closure' means outside of that particular context for most people.

For a non-JSLint-report-specific definition you could look at

http://www.jibbering.com/faq/notes/closures/#clDefN

--
Jake Jarvis
.



Relevant Pages

  • Re: Why is this a closure?
    ... Global test ... I thought I had understood the concept of closure: ... | If JSLint is able to complete its scan, ...
    (comp.lang.javascript)
  • Re: Piccadilly line signal failure
    ... >Seems that theres been a failure this morning between T123 and T5 ... I checked the service status on on Friday morning and saw the report Boltar referenced. ... There is a link entitled "Track Closures" from there to where that closure is not mentioned. ... They don't seem to recognise that changing information to reflect reality is necessary. ...
    (uk.transport.london)
  • Re: Beeching era
    ... I would define the start as the first closure of a line that had been ... listed in the Beeching report. ... second was the publication of the report of the Guillebaud Pay ... Inquiry, which recommended a substantial increase in railway wages, ...
    (uk.railway)
  • Re: Beeching era
    ... I would define the start as the first closure of a line that had been ... listed in the Beeching report. ... second was the publication of the report of the Guillebaud Pay ... Inquiry, which recommended a substantial increase in railway wages, ...
    (uk.railway)