Javascript guessing game for class