About 2,870,000 results
Open links in new tab
  1. How To Get The Length of a String in JavaScript - W3Schools

    Learn how to find the length of a string in JavaScript. The length property returns the length of a string: Read more about strings in our JavaScript Strings Tutorial. Read more about the length property in our JavaScript String length Reference. W3Schools is …

  2. JavaScript String length Property - W3Schools

    The length property returns the length of a string. The length property of an empty string is 0.

  3. JavaScript String length (with Examples) - Programiz

    In this tutorial, you will learn about the JavaScript String length property with the help of examples. The JavaScript String length property returns the number of characters in a string.

  4. JavaScriptLength of a String - GeeksforGeeks

    Nov 17, 2024 · In JavaScript, determining the length of a string in characters is straightforward using the length property. However, in many cases, particularly when dealing with file sizes, network protocols, or database storage, you might need to know the length of a string in bytes.

  5. String: length - JavaScript | MDN - MDN Web Docs

    Mar 13, 2025 · The length data property of a String value contains the length of the string in UTF-16 code units.

  6. JavaScript string.length - GeeksforGeeks

    Nov 16, 2024 · The string.length is a property in JS which is used to find the length of a given string. The string.length property returns 0 if the string is empty. Syntax: string.length. Return Values: It returns the length of the given string. In JavaScript arrays also have length property to find length of an array.

  7. JavaScript String length Property - GeeksforGeeks

    Oct 29, 2024 · The JavaScript length property is a fundamental feature used to determine the number of characters in a string. It is essential for various string operations, such as validation, manipulation, and iteration.

  8. How to check string length with JavaScript - Stack Overflow

    Jun 15, 2012 · Use keyup event. chars.innerHTML = inp.value.length;

  9. JavaScript String length Property - Online Tutorials Library

    Learn how to determine the length of a string in JavaScript with examples and explanations. Understand the use of the length property effectively.

  10. Get the Length of a String in JavaScript - Online Tutorials Library

    In this tutorial, we learned two different approaches to find the length of a string. In the first approach, we use the length property of the String. In the second approach, we created a custom function to find the length of the string. The first method is straightforward to find the string length.

  11. Some results have been removed