Code to go logo
Created using Figma
Use Cases
Contribute
How to get length of string in JavaScript
Strings
By Jad Joubran ·
Last updated Dec 29, 2017
const name = "Penny"; console.log(name.length);
5
Dec 29, 2017
1
Jad Joubran
See answer
1
Jad Joubran
String.length
on MDN
Learn JavaScript step by step