Skip to content

be careful with nested turnaries #12

@eadehemingway

Description

@eadehemingway

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions