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 Add two elements</h2> <button @click="myFunction">Insert new Number</button> <p>Numbers : {{numbers}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ numbers:['1','2','3','4','5','6'], } }, methods:{ myFunction(){ this.results = this.numbers.push('7','8'); }, } }).mount('#app') </script> </body> </head> </html>