⭐⭐ Two Words Code ⭐⭐
Approach\nJust \'return n++\'\nIt will simply first return \'n\' and then will change \'n\' to \'n+1\'.\n\n# Code\n\n/**\n * @param {number} n\n * @return {Func
# Approach\nJust \'return n++\'\nIt will simply first return \'n\' and then will change \'n\' to \'n+1\'.\n\n# Code\n```\n/**\n * @param {number} n\n * @return {Function} counter\n */\nvar createCounter = function(n) {\n    return function() {\n        return n++;\n    };\n};\n\n/** \n * const counter = createCounter(10)\n * counter() // 10\n * counter() // 11\n * counter() // 12\n */\n```
['JavaScript']