|
className={ |
|
i === id |
|
? isCorrect |
|
? "images correct" |
|
: "images wrong" |
|
: "images" |
nested turnaries can be difficult to use so if you have to use them then name the conditions to make it very clear. So give the first condition a name (the i === id) because i currently dont know what it is checking for, and the 'isCorrect' condition could be more explicit e.g 'guessIsCorrect'
English-Learning-Game/src/components/Game/index.js
Lines 65 to 70 in 6794c03
nested turnaries can be difficult to use so if you have to use them then name the conditions to make it very clear. So give the first condition a name (the i === id) because i currently dont know what it is checking for, and the 'isCorrect' condition could be more explicit e.g 'guessIsCorrect'