About 36,000,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 …

  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. Length of a JavaScript object - Stack Overflow

    Aug 8, 2008 · You can simply use Object.keys(obj).length on any object to get its length. Object.keys returns an array containing all of the object keys (properties) which can come in …

  4. javascript - How can I find the length of a number ... - Stack Overflow

    Jun 8, 2012 · In Node.js I wrote a quick basic test with the function nLength = (n) => 1 + Math.log10(Math.abs(n) + 1) | 0; and with Math.log10 it worked as expected.

  5. How to check string length in JavaScript? - Stack Overflow

    Oct 22, 2015 · How can I check the length of in String in JavaScript? Here is a small code example: if(value != null && value != "" && value.length !== 10 && !value.match(/^\d*$/)){ // do …

  6. 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.

  7. JavaScriptLength of a String - GeeksforGeeks

    Nov 17, 2024 · These are the following ways to Find the Length of a String in JavaScript: This approach directly utilizes the built-in length property of strings in JavaScript, which returns the …

  8. JavaScript String Length: The Ultimate Guide - Methods, …

    Oct 27, 2024 · Optimizing for Performance. While the .length property is generally efficient, there are a few things to consider for performance, especially when dealing with very large strings or …

  9. JavaScript String length - Get Length of String | Vultr Docs

    Apr 10, 2025 · In this article, you will learn how to check the length of a string in JavaScript using the length property. You will also learn how to check the size of a string, which is essential for …

  10. 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.

Refresh