This is a very simple javascript algorithm to figure out, because it's still only level2 of the hacker/cracker test.