How to get string length in Vue JS?

By Hardik Savani | July 16, 2019 | Category : Vue.JS

In this small example, i will share with you getting string length in vue js. you can easily get string length in vue.js. we can get vue js get string length using ".length" attribute.

It seems very easy, but sometime we need to get our string length or size at time we need to get length using vue js.

you can see bellow sample code:

{{ myString.length }}

You can see bellow full example:


<!DOCTYPE html>



<title>How to get string length in Vue JS? -</title>

<script src=""></script>



<div id="app">

<p>String : {{ myString }}</p>

<p>String Length : {{ myString.length }}</p>


<script type="text/javascript">

var app = new Vue({

el: '#app',

data: {

myString: "This is"






I hope it can help you...

Tags : Example Vue.JS

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: