Hi, been stuck with this for a few days...
I have some groups of radio buttons, depending on which radio button is selected a list of possible strings should each get a point... For example, I need to end up with an object like this;
-
var score = {
-
point1 : 0,
-
point2 : 0,
-
point3: 0,
-
point4: 0,
-
point5: 0,
-
point6: 0
- }
-
If first radio button in group 1 is selected, point 1 and point 6 should count up 1 (this will be different for each radio button in each group )
I've already got functions, loops and arrays that return the correct strings depending on which radio buttons are selected, now I just need a function to make the object properties increment, then I need to match the properties to the strings that are preset in their arrays .
For a deeper look at what I'm trying to achieve, all the current working code is here:
The first alert gives me the correct strings based on the radio button selection, the second alert gives me the final score with most points (which are currently all '0'). I'm not sure if this is the best and most efficient way of writing the code...
Any help appreciated. Thanks.