The function seems to apply a rule to most words where it returns a numerical value as the output. However, for some words, the function returns "undefined".

