From fcb7201982f865cc22322aecc6b3797b70a8961b Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 22 Aug 2024 13:15:59 -0700 Subject: [PATCH] remove sandbox file --- .gitignore | 2 -- manual-testing-sandbox/test.js | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 manual-testing-sandbox/test.js 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; + } +}