remove sandbox file
This commit is contained in:
parent
c56f3c4df3
commit
fcb7201982
2 changed files with 37 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -165,7 +165,5 @@ Icon?
|
|||
|
||||
.continue
|
||||
|
||||
# Sandbox env default file
|
||||
manual-testing-sandbox
|
||||
|
||||
.prompts/
|
||||
37
manual-testing-sandbox/test.js
Normal file
37
manual-testing-sandbox/test.js
Normal file
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue