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 Pop Method function</h2> <p>pop() delete the last element of an array.</p> <button @click="myFunction">Delete last Element </button> <p>Countries : {{countries}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ countries:['India','England','America','Australia','China','Russia'], } }, methods:{ myFunction(){ this.results = this.countries.pop(); }, } }).mount('#app') </script> </body> </head> </html>