Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

410 B

title
title
Find the Length of a String

Find the Length of a String


Hints

Hint 1

Strings have an attribute (feature) called 'length'. All you have to do is tag it after the string / variable.

var str1 = "Hello";
var length1 = str1.length; // This returns 5

var length2 = " Camper".length; // This returns 7 because the space is counted as one character.