Tutorialsplane

Vue.js convert string to uppercase


We can use native JavaScript function to convert string to uppercase. JavaScript function toUpperCase() is used to convert a string to Uppercase. Here in this tutorial, we are going to explain how you can use this function is vuejs. You can use our online editor to edit and run the code online.


Vue.js convert string to uppercase Example

You can convert string to uppercase simply as below-

Example:

<div id="app">	
	<p>{{myStr}}</p>
	<p>{{myStr2}}</p>
	<button>Click Me</button>
</div>
 

Try it ยป

Output of above example-