Quantcast
Channel: Help me clean up my functional JS
Viewing all articles
Browse latest Browse all 13

Help me clean up my functional JS

$
0
0

@AdventureBear wrote:

Thanks, that helps a lot. You know, i’ve been doing this (as a hobby) for 5 years now, I hope I eventually can sort these out. A lot of my applications involve complex objects like this one.

I tried something similar to your first answer, but I got back all of the questions. I think I deleted that non-working solution so I can’t compare to see what I did wrong.

Also, the answer choices are shuffled each time the quiz is run, so ID and index are not always the same thing.

I appreciate your help & time!

UPDATE: So I need to use find instead of filter since there is only one correct answer for each question. Brilliant! I had the right idea, wrong implementation.

Read full topic


Viewing all articles
Browse latest Browse all 13

Trending Articles