Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add solution #2372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add solution #2372

wants to merge 2 commits into from

Conversation

Nazarin565
Copy link

Copy link

@nazarmatsevych nazarmatsevych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost done, please fix the comment below

{person.age && <p className="Person__age">I am {person.age}</p>}
<p className="Person__partner">
{person.isMarried &&
person.sex === 'm' &&

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks too complicated, let's create a separate variable for person partner and use it here:

const partner = person.sex === 'm' ? 'wife' : 'husband'

@Nazarin565 Nazarin565 requested a review from nazarmatsevych May 20, 2024 19:21
Copy link

@nazarmatsevych nazarmatsevych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants