Skip to main content

Challenge

Expand the functionality of the UserDetails struct a little bit:

  1. Add an optional age property
  2. Add a new update_age function to update a users age with a new value
  3. Add a whats_my_age() function to return the users age
  4. Update the console application to test out your new functions

The starter code for this challenge is available on GitHub.

If you're struggling, you can find a solution on GitHub. Try it on your own first, if you're finding it difficult that's good. It means you're learning.