add function lengthOfWords(wordArray, string) to return the sum of a length of a string and the difference of the length of the wordArray and string; call function as new length measurement for while loop