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:

This is working for me, however I can’t seem to grab just the ID with this syntax, I get an error ‘id is not defined’

return quizQuestion.answers.find((answer) => answer.correct === true)[id];

I can return the whole item, and deal with it outside this mapping routine, but would like to just grab the ID.

Read full topic


Viewing all articles
Browse latest Browse all 13

Trending Articles