30 day js day1
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```javascript []\nclass Calculator {\n  \n    /** \n     * @param {number} value\n     */\n\tconstructor(value) {\n\t\tthis.x = value;\n\t}\n\n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n\tadd(value){\n\t\tthis.x += value;\n        return this\n\t}\n\n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n\tsubtract(value){\n\t\tthis.x -= value;\n        return this\n\t}\n\n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */  \n\tmultiply(value) {\n\t\tthis.x *= value;\n        return this\n\t}\n\n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n\tdivide(value) {\n        if (value === 0) {\n            throw new Error("Division by zero is not allowed");\n        }\n        this.x /= value;\n        return this\n\t}\n  \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n\tpower(value) {\n\t\tthis.x = Math.pow(this.x, value);\n        return this\n\t}\n    \n    /** \n     * @return {number}\n     */\n\tgetResult() {\n\t\treturn this.x;\n\t}\n}\n```
['JavaScript']