Menu
×
×
Correct!
Exercise:The watcher in this exercise is supposed to increment the 'count' data property by one every time 'rangeVal' data property changes. What must the watcher be called?
<script>
const app = Vue.createApp({
data() {
return {
rangeVal: 70,
count: 0
}
},
watch: {
@(8)() {
this.count++
}
}
})
app.mount('#app')
</script>
<script>
const app = Vue.createApp({
data() {
return {
rangeVal: 70,
count: 0
}
},
watch: {
rangeVal() {
this.count++
}
}
})
app.mount('#app')
</script>
Not CorrectClick here to try again. Correct!Next ❯ |
This will reset the score of ALL 54 exercises.
Are you sure you want to continue?