javascript - Updating Array comparison function for strings -
i'm working pre-written code quiz trivia game, , have update games question choices number values strings. don't know change in code user choice compared correct answer. currently, number answers, code compares array placement of correct choice in choices array, correctanswer variable. best guess change has occur in displayscore function shown @ bottom. a current question object: { question: "what 2*5?", choices: [2, 5, 10, 15, 20], correctanswer: 2 } and updated question object be: { question: "which list contains words not names of shoe types:" choices:[ "a. oxford, jelly, boat, clogs, stiletto, mary jane", "b. loafer, gladiator, wedge, mule, platform", "c. pump, moccasin, wingtip, sneaker, derby, monk", "d. chalupa, dogler, hamster, croonley, frankf...