The challenge doesn’t ask you to give values to the ageDifference function by yourself. You have to pass in youngest and oldest objects. When you pass in these objects, use dot notation or bracket notation to access the age property value of the objects and subtract those values to get the answer in the ageDifference function.
your issue is here, you can’t do this, because the values you pass in are the objects youngest and oldest. you can’t do a subtraction with objects. you need to change that line so that you are using the numbers that are present inside the objects
Thank you for trying to allow me to think rather than receiving the answer. I’m very new to Javascript and have been learning HTML and CSS and finding it quite overwhelming as it is very different.
I don’t know any website that deal with age differences, so no
but often when you start you are just doing simple things, to learn how things work. in real life situations the things are a bit more complex
most times users are stored in database as objects, and functions and methods work with specific properties
in a real life situation the objects would most likely have dozens of properties, but the way in which objects are manipulated doesn’t change