How to get string length in Vue JS?

Posted by LaravelIndia - 4 years ago

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.

<!DOCTYPE html>
<html>
<head>
    <title>How to get string length in Vue JS? - example.com</title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>

<div id="app">

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

</div>

<script type="text/javascript">

    var app = new Vue({
      el: '#app',
      data: {
        myString: "This is example.com"
      }
    })

</script>

</body>
</html>

maxwin slot mahjong ways