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 toString Method</h2> <p>Convert Array to string in Vue js</p> <button @click="addFun">click me</button> <p>Array{{dummyArray}}</p> <p>String: {{result}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ dummyArray:['Sarkari Naurkri Exams','Font Awesome Icons','Schools Geek','Tutorials Plane'], result:'' } }, methods:{ addFun(){ this.result = this.dummyArray.toString(); }, } }).mount('#app') </script> </body> </head> </html>