A simple Mastermind in JavaScript