lengthThis function returns the number of characters in a string.Parameter: stringThis example returns the number of characters in a string. The result is 4.