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 Array.isArray() function</h2> <p>To check given variable is array or not</p> <button @click='myFunction' class='btn btn-primary'>check Array </button> <p></p> <p>{{result}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ country:['Australia','England','America','India','China','Russia'], result : '' } }, methods:{ myFunction(){ this.result = Array.isArray(this.country); }, } }).mount('#app') </script> </body> </head> </html>