Best Solution | Easy to Understand | Beats 90%
\n# Code\njavascript []\nclass Calculator {\n    \n    /** \n     * @param {number} value\n     */\n    constructor(value) {\n        this.val = value\n    }\n 
\n# Code\n```javascript []\nclass Calculator {\n    \n    /** \n     * @param {number} value\n     */\n    constructor(value) {\n        this.val = value\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n    add(value){\n        return new Calculator(this.val + value);\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n    subtract(value){\n        return new Calculator(this.val - value);\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */  \n    multiply(value) {\n        return new Calculator(this.val * value);\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n    divide(value) {\n        if (value === 0) throw "Division by zero is not allowed"\n        return new Calculator(this.val / value) ;\n    }\n    \n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n    power(value) {\n     return new Calculator(this.val ** value);   \n    }\n    \n    /** \n     * @return {number}\n     */\n    getResult() {\n        return this.val\n    }\n}\n```
['JavaScript']