🎯 Easy JavaScript Solution🔥
Code:\n\nclass Calculator {\n    \n    /** \n     * @param {number} value\n     */\n    constructor(value) {\n        this.result = value;\n    }\n    \n    /**
# Code:\n```\nclass Calculator {\n    \n    /** \n     * @param {number} value\n     */\n    constructor(value) {\n        this.result = value;\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n    add(value) {\n        this.result += value;\n        return this;\n    }\n\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n    subtract(value){\n        this.result -= value;\n        return this;\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */  \n    multiply(value) {\n        this.result *= value;\n        return this;\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n    divide(value) {\n        if (value === 0) {\n            throw new Error(\'Division by zero is not allowed\');\n        }\n\n        this.result /= value;\n        return this;\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n    power(value) {\n        this.result = Math.pow(this.result, value);\n        return this;\n    }\n    \n    /** \n     * @return {number}\n     */\n    getResult() {\n        return this.result;\n    }\n}\n```\n\n\n![upvote.jpeg](https://assets.leetcode.com/users/images/f0f1d685-0903-4fde-9d8c-d635a3b4348b_1720676429.7552855.jpeg)\n
['JavaScript']