Javascript version of Mastermind