🏆️ JS simplest one liner
Complexity\n- Time complexity:\nO(1)\n\n- Space complexity:\nO(1)\n\n# Code\n\n/**\n * @param {number} n\n * @return {Function} counter\n */\nconst createCounte
# Complexity\n- Time complexity:\n$$O(1)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```\n/**\n * @param {number} n\n * @return {Function} counter\n */\nconst createCounter = n => () => n++;\n```
['JavaScript']