Getting Started with Vue.js Chapter 1
// Work out the price of the item including
sales tax
return parseFloat(
Math.round((this.salesTax / 100) * price) +
price).toFixed(2);
},
addCurrency(price) {
return this.currency + price;
}
}
});
The result, although basic, should look like the following:
Summary
In this chapter, we learned how to get started with the Vue JavaScript framework. We
examined the data, computed, and methods objects within the Vue instance. We covered
how to use each one within the framework and utilize each of its advantages.