Feedback for Working withJSON test 1

Hi everyone. I just completed the assessment and I would like someone to look at my solution hire is the codepan link.

Thank in advance

Great work @milan.z

I have just two small thing:

  • Your motherInfo contains two spaces between the names. This isn’t visible in HTML because consecutive whitespaces are treated as a single space. This could be a problem in cases where you use the strings elsewhere.
  • Instead of adding the index when counting total and male you should just do total++ and male++ respectively.

I hope that helps. :slightly_smiling_face:

Michael

1 Like

It helps a lot @mikoMK :slight_smile:
A second small thing I understand.
A first small thing, do you recommend not using template strings in this case?

1 Like

Whenever I have to combine variables and “normal” text in a string I resort to template strings. So I think it’s fine to use them in this case.

1 Like