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 sort() string Method</h2> <button @click="myFunction">Sort string</button> <p>{{demoString}}</p> <p>{{results}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ demoString:'fontawesomeicons', results:'' } }, methods:{ myFunction(){ this.results = Array.from(this.demoString).sort().join(''); }, } }).mount('#app') </script> </body> </head> </html>