import {ref, watch, watchEffect} from 'vue'
const a = ref(1);
const n = ref(2);
const b = ref(null);
const c = ref(null);
watch(a, () => {
b.value = a.value + n.value
})
watchEffect(() => {
b.value = a.value + n.value
})
watch(a, (newval, oldvalue) => {
c.value = newval + oldvalue
})