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 string.endsWith("text") Method </h2> <p>String endswith() in Vue Js</p> <button @click="myFunction">click me </button> <p>Sring:{{text}}</p> <P>Result:{{results}}</P> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ results : '', text:'FONTAWESOMEICONS', } }, methods:{ myFunction(){ this.results = this.text.endsWith("ICONS"); }, } }).mount('#app') </script> </body> </head> </html>