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
String.length on MDN