screen_rotation
Copied to Clipboard
<html> <head> <script type="importmap"> { "imports": { "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js" } } </script> <body> <div id="app"> <h3>Vue Js Find Maximum number in Vue Js</h3> <button @click="getMaxValue">click me</button> <p>{{maxValue}}</p> </div> <script type="module"> import { createApp } from "vue"; createApp({ data() { return { demoArray: [23, 45, 78, 12, 45], maxValue: '' } }, methods: { getMaxValue() { this.maxValue = Math.max.apply(Math, this.demoArray) } } }).mount("#app"); </script> </body> </head> </html>