3 ms·
Some quick thoughts on the code: http://pastebin.com/hYiB01RH http://pastebin.com/hYiB01RH First, the isLetter function is both wrong and unused. Second, mess
by hammeiam 11y ago
Some quick thoughts on the code: http://pastebin.com/hYiB01RH http://pastebin.com/hYiB01RH
First, the isLetter function is both wrong and unused.
Second, messUpMessyPart is suboptimal. Rather than using a while loop to generate random numbers until a < b, why not do something like `var nums = [rand, rand].sort(); a = nums[0]; b = nums[1]`. There's still the case where a=b, but maybe you just run the function 2/10 times instead of 1/10 to compensate for that case.