Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

Vue - basic way of outputting variable value into HTML

0 votes
12 views
added Jul 11 in Vue by LC Marshal Lieutenant (14,570 points)
edited Jul 12 by LC Marshal
<body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <div id="app">
    <div>{{ result }}</div>
  </div>
</body>
<script>
result5Title = 'RM50K Loan | ' + y10 + ' years at RM682/mth' + ' | dividend= ' + x + '%' + ' | Interest rate= ' + kuwaitRate + '%',
    result5a = 'Year 5 gross/loan = ' + (Math.round((kt5 - case50) + case50)).toLocaleString() + s + '-' + (Math.round(kuwait50Annual10y * y5)).toLocaleString(),
    result5b = 'Year 10 gross/loan = ' + (Math.round(kt10)).toLocaleString() + s + '-' + (Math.round(kuwait50Annual10y * y10)).toLocaleString(),
    result5c = 'Year 15 gross/loan = ' + (Math.round(kt15)).toLocaleString() + s + loan10,
    result5d = 'Year 20 gross/loan = ' + (Math.round(kt20)).toLocaleString() + s + loan10,
    result5e = 'Year 25 gross/loan = ' + (Math.round(kt25)).toLocaleString() + s + loan10;

var app = new Vue({
  el: '#app',
  data: {
     //combined variables to be output
     result: result5Title + '\n\n' + result5a + result5b + result5c + result5d + result5e,
  }
}) 
</script>

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...