screen_rotation
Copied to Clipboard
<html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <h3>Vue Js Fahrenheit convert into Celsius</h3> <div id="app"> <p>Enter Fahrenheit Temp</p> <input v-model="temperatureInFahrenheit" /> <p>Temperature in Celsius: {{ temperatureInCelsius }}</p> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { temperatureInFahrenheit: 0 }; }, computed: { temperatureInCelsius() { return (this.temperatureInFahrenheit - 32) * (5 / 9) } } }); </script> </body> </html>