Guess the number challenge using JavaScript