Can the rack spell the word?
A rack of Scrabble tiles can spell a word when, for every letter in the word, the rack has at least as many of that letter as the word needs. Step through canSpell and watch it call letterCount twice for each letter — once on the rack, once on the word.
Code
The strings
being scanned
being scanned
canSpell's
i (picks the letter)
letterCount's i (scans)
counted as a match