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"> <h2>Vue js valueOf Method</h2> <p>Get value of the array in Vue js</p> <button @click="myFun">click me</button> <p>{{array}}</p> <p v-html="result"></p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ array:['India','Pakistan','America','England','Africa'], result:'' } }, methods:{ myFun(){ this.result = this.array.valueOf(); }, } }).mount('#app') </script> </body> </head> </html>