Feb
5th

How To Find Length of String In Javascript?

Files under Javascript | Leave a Comment | 682 views

While working with strings, most probably we will need to find a length of string, count of charachers and etc. In JavaScript we can make use of the string related function as the [variable].length

So, here we go!! I decided to share some really basic source code. Here’s the example shows in an alert dialog box with the length of the string “My Name is David”

var mystring = “My Name is David”;
alert( mystring.length );

(more…)