Assessment wanted for JSON task 1

Link to task: https://github.com/d4n1eu04/JSONtaskmdn.git

It is working as intended, but I want to know if there’s something I could improve on the code
tnxs :grin:

Hi @Danieu and welcome to the community :wave:

I only see one possible simplification for the motherNames conditionals:
You could move the content of the first if block to the end into an else block. This would get rid of the conditional.
Do you know what I mean?

There’s an additional question in the exercise. Can you think of a reason?

Why are the para1.textContent = motherInfo; and para2.textContent = kittenInfo; lines inside the displayCatInfo() function, and not at the end of the script? This has something to do with async code.

I hope that helps,
Michael