javascript - Need to add multiple answers to a single array -


I have to add multiple questionnaires to use the same code / ARAME. How can I do this? Answer the questions [0] = ["Apple", "Test"]

  // questions; Answer [1] = "Dynamic HTML"; Answer [2] = "Netscape"; Answer [3] = "Common Gateway Interface"; As you can see, I have just tried to add my second answer to the code array for a second quiz but this does not recognize the answer. What is the best way to do this? (There is a "or" command or something like that?  

Here is my complete code:

  // var numques = 4; // Insert each question var numChoi Enter the number of questions displayed in the North field var answers = new array (4); // questions [0] = ["apple", "test"]; Answer [1] = "Dynamic HTML", "Test"; Answer [2] = "Netscape", "Test"; Answer [3] = "Common Gateway Interface", "Test"; // Anything belowChange here ... function getScore (form) {var score = 0; var currElt; var for currSelection; for (i = 0; i   

So to make it easy to understand .. I want some quiz links to this code to use for the answer instead of repeating the whole code for each quiz. What amendments are needed?

If you want an array of arrays of your array, you have 1, 2 and 3 Is the lines around?

Such ...

  answer [0] = ["apple", "test"]; Answer [1] = ["dynamic html", "test"]; Answer [2] = ["Netscape", "Test"]; Answer [3] = ["General Gateway Interface", "Test"];   

It may be easy to help if I can edit below the line that does not ask me. I think that you really want something like

  currSelection.value == answer [i] [j]   

instead of

  currSelection.value == Answer [i]    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -