diff --git a/.gitignore b/.gitignore index 16956223a..3fa43ae1a 100644 --- a/.gitignore +++ b/.gitignore @@ -165,7 +165,5 @@ Icon? .continue -# Sandbox env default file -manual-testing-sandbox .prompts/ \ No newline at end of file diff --git a/manual-testing-sandbox/test.js b/manual-testing-sandbox/test.js new file mode 100644 index 000000000..44c55402e --- /dev/null +++ b/manual-testing-sandbox/test.js @@ -0,0 +1,37 @@ +class Calculator { + constructor() { + this.result = 0; + } + + add(number) { + this.result += number; + return this; + } + + subtract(number) { + this.result -= number; + return this; + } + + multiply(number) { + this.result *= number; + return this; + } + + divide(number) { + if (number === 0) { + throw new Error("Cannot divide by zero"); + } + this.result /= number; + return this; + } + + getResult() { + return this.result; + } + + reset() { + this.result = 0; + return this; + } +}