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 
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 
Hi @Danieu and welcome to the community ![]()
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;andpara2.textContent = kittenInfo;lines inside thedisplayCatInfo()function, and not at the end of the script? This has something to do with async code.
I hope that helps,
Michael