Given a person's writing sample, estimate their IQ using the following algorithm. Sum the length of each word, multiply by 15, then divide by the number of words (truncate any fractional part). Assume words are separated by whitespace and that there is no punctuation.
getIQ("i use short words") → 52
getIQ("mississippi expectations exceed extraordinary") → 157
getIQ("hello bye") → 60
...Save, Compile, Run