the most simple code
javascript\nvar createCounter = function(n) {\n    return function() {\n        return n++;\n    };\n};\n
```javascript\nvar createCounter = function(n) {\n    return function() {\n        return n++;\n    };\n};\n```
['JavaScript']