Beats 91.47%of users with JavaScript
\n\nclass Calculator {\n \n\tconstructor(value) {\n        this.value = value;\n        this.error;\n\t}\n\n\tadd(value){\n\t\tthis.value += value;\n        ret
\n```\nclass Calculator {\n \n\tconstructor(value) {\n        this.value = value;\n        this.error;\n\t}\n\n\tadd(value){\n\t\tthis.value += value;\n        return this;\n\t}\n\n    /** \n     * @param {number} value\n     * @return {Calculator}\n     */\n\tsubtract(value){\n\t\tthis.value -= value;\n        return this;\n\t}\n\n\tmultiply(value) {\n\t\tthis.value *= value;\n        return this;\n\t}\n\n\tdivide(value) {\n        if (value === 0) this.error = "Division by zero is not allowed"\n\t\tthis.value /= value;\n        return this;\n\t}\n  \n\tpower(value) {\n\t\tthis.value = this.value ** value;\n        return this;\n\t}\n    \n\tgetResult() {\n        if (!this.error) return this.value\n        else return this.error\n\t}\n}\n```
['JavaScript']