Our first example is the length function.
The length function is a function that
returns the number of elements in an object.
Using it on a string tells
us how many characters the string has.
Earlier in the program,
we learned that IP addresses have
two versions, IPv4 or IPv6.
IPv4 addresses have a maximum of 15 characters.
So a security professional might use
the length function to check if an IPv4 address is valid.
If its length is greater than 15 characters,
then we'd know that it's an invalid IPv4 address.