Mastermind in nodejs