Javascript: Count the length of a string (like strlen() in PHP!)
Javascript can be used to quickly count the length of a string: This works similar to the strlen() function in PHP. So you know if a string contains 2, 3 or 255 characters.var string = 'this is a string';var strlength = string.length;The function to determine the length of a string with Javascript is called "length": To determine the length of the string, simply append the function to the string variable. The variable "strlength" in the examp... Read more...