<div id="app">
<p>{{myStr}}</p>
<p>{{myStr2}}</p>
<button @click="myFunction()">Click Me</button>
</div>
<script>
new Vue({
el: '#app',
data: {
myStr:"Hello World!",
myStr2:""
},
methods:{
myFunction: function () {
this.myStr2 = this.myStr.toUpperCase();
}
}
});
</script>