<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<h1>
1. exercise
</h1>
<div>
My name : {{name}}
<div>
My age : {{age}}
</div>
</div>
<h1>
2. exercise
</h1>
<p>
AGE*3 = {{age * 3}}
</p>
<h1>
3. exercise
</h1>
<p>
{{randomnum()}}
</p>
<h1>
4. exercise
</h1>
<div>
<img :src="thumnail" style="width:100px; height:100px">
</div>
<h1>
5. exercise
</h1>
<div>
<input type="text" :value="name">
</div>
</div>
new Vue({
el: "#app",
data: {
name: "alo",
age: 13,
thumnail:'http://www.coindeskkorea.com/news/photo/202201/77238_17805_4923.png'
},
methods: {
randomnum: function() {
return Math.random()
}
}
});