how to join two table in codeigniter easily[updated] | ci_model | ci_controller | codeigniter 3 -datainflow
Reverse words in a sentence – Vue.js
Reverse the string “Welcome Vue.js!” use the Vue.js reverse function in your application. If you want to specifies the string to reverse this tutorial will help you to solve this.
Use Vue.js reverse words in a given sentence using split and reverse function in a single page of your project. If you would like to know how you would reverse word order in a sentence so, follow this tutorial’s example. That’s like:
Example:
<script src="https://unpkg.com/vue"></script> <div id="app"> <p>{{ title }}</p> </div> <div id="app2"> <p>{{ words }}</p> <button v-on:click="reverseWord">Reverse Word</button> </div> <script type="text/javascript"> var app = new Vue({ el: '#app', data: { title: 'Vue.js Tutorial' } }) var app2 = new Vue({ el: '#app2', data: { words: 'Welcome Vue.js!' }, methods: { reverseWord: function () { this.words = this.words.split('').reverse().join('') } } }) </script>
Related posts