I've tried using a return function in VueJS methods to return what is in Vue instance.
This is my code, but it doesn't show anything in the browser:
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<div id="app">
<input type="text">
<h1>{{ sayHello() }}</h1>
</div>
<body>
<script>
new Vue({
el: '#app',
data: {
title: "Hello world!"
},
methods: {
sayHello: () => {
return this.title;
}
}
});
</script>
</body>
</html>