Dogs Years questions

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

Hello everybody,
Nice to meet you. I’m French, and I don’t speak english fluently. Sorry for my bad language, so.
I wonder if an exercice is true, because and I’m not agree with the proposition. It’s not very important for the JS language, but a little bit important for the logic.
I think that, in this exercice: , the solution isn’t true.

The exercice want us to calculate our age if we were a dog. But, the solution given don’t seem to be true. The solution given is how to calculate our human age if we were a dog.

I find this solution wich seem to be good to the exercice :
const myAge = 37;

let earlyYears = 2;

earlyYears *= 10.5;

let laterYears = myAge - earlyYears;

laterYears /= 4

const myDogAge = (myAge - earlyYears)/4 + 2;


Like this, we can calculate our dog’s age from our human’s age.

I don’t know if I was clear, sorry, my vocabulary is limited…

Thanks for your answer,


That should be times, not divide.

An average size dog, say 40 to 50 pounds, will reach full maturity in the first two years of their life. That’s where the 21 comes from. After that, and as they age their metabolism slows gradually so that by the age of ~12 human years, their metabolism will have them aging by one human year per year.

See this paragraph on Wikipedia that descibes logic used here…