Mastermind - JavaScript