const vm = Vue.createApp({
data(){
return{
firstname: "tanner",
lastname: "die"
}
},
methods:{
fullname(){
return `${this.firstname} ${this.lastname.toUpperCase()}`
}
}
}).mount("#app")
How exactly is data a function was it predefined or does Vue know that its a function.
Is methods an object or a function and if its an object why dont we say
{{methods.fullname()}}
when were displaying it in HTML.