How to Check the Length of a String Variable in JavaScript

Data structures have properties. For example, strings have a property called .length that will tell you how many characters are in the string.

lastNameLength = lastName.length;