Re: Why is this a closure?



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.

--
Jake Jarvis
.