diff --git a/basics-assignment-3-problem/app.js b/basics-assignment-3-problem/app.js index 8d9cd7d..73d3be3 100644 --- a/basics-assignment-3-problem/app.js +++ b/basics-assignment-3-problem/app.js @@ -3,31 +3,31 @@ const app = Vue.createApp({ data() { return { - result: 0, + counter: 0, }; }, watch: { - result() { + status() { const that = this; setTimeout(function () { - that.result = 0; + that.counter = 0; }, 5000); }, }, computed: { status() { - if (this.result < 37) { + if (this.counter < 37) { return "Not there yet"; - } else if (this.result > 37) { + } else if (this.counter > 37) { return "Too much!"; - } else if (this.result === 37) { - return this.result; + } else if (this.counter === 37) { + return this.counter; } }, }, methods: { increaseCounter(value) { - this.result += value; + this.counter += value; }, }, }); diff --git a/basics-assignment-3-problem/index.html b/basics-assignment-3-problem/index.html index 545f129..fb74ebe 100644 --- a/basics-assignment-3-problem/index.html +++ b/basics-assignment-3-problem/index.html @@ -21,8 +21,7 @@ -

{{ status }}

-

Result: {{ result }}

+

Result: {{ status }}