import Alpine from "alpinejs"; Alpine.start(); const app = new Vue({ el: "#app", data: { amount: null, from: null, to: null, }, methods: { submit() { const fromCurrency = this.from; const toCurrency = this.to; if(fromCurrency && toCurrency){ return(html`

The amount of ${amount} in ${fromCurrency} is ${conversion(amount, fromCurrency, toCurrency)} in ${toCurrency}!

`); } else { return(html`

Please select a currency!

`); } }, conversion(amount, fromCurrency, toCurrency){ // Conversion logic } }, });