How to use string length property in Javascript

Description

property length indicates the number of characters in the string.

Example


var stringValue = "hello world"; 
console.log(stringValue.length); //"11" 

The code above generates the following result.





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window