done
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   * @param {number} value\n   */\n  constructor(value) {\n    this.res = value;\n    this.busted = false;\n  }\n\n  /**\n   * @param {number} value\n   * @return {Calculator}\n   */\n  add(value) {\n    if (this.busted) return this\n    this.res += value;\n\n    return this;\n  }\n\n  /**\n   * @param {number} value\n   * @return {Calculator}\n   */\n  subtract(value) {\n    if (this.busted) return this;\n    this.res -= value;\n    return this;\n  }\n\n  /**\n   * @param {number} value\n   * @return {Calculator}\n   */\n  multiply(value) {\n    if (this.busted) return this;\n    this.res *= value;\n    return this;\n  }\n\n  /**\n   * @param {number} value\n   * @return {Calculator}\n   */\n  divide(value) {\n    if (this.busted) return this;\n    if (value == 0) {\n      this.res = "Division by zero is not allowed";\n      this.busted=true;\n      return this\n    }\n    this.res /= value;\n    return this;\n  }\n\n  /**\n   * @param {number} value\n   * @return {Calculator}\n   */\n  power(value) {\n    if (this.busted) return this;\n    this.res = Math.pow(this.res, value);\n    return this;\n  }\n\n  /**\n   * @return {number}\n   */\n  getResult() {\n    return this.res;\n  }\n}\n\n```
['JavaScript']