Dog Years

This is the second exercise I am having problems with in Javascript. I am following the instructions, but I am not get the results I should be getting.

Can someone help?

Link:

My Answer
//my current age
const myAge = 30;
//early Years
let earlyYears= 2;
earlyYears *= 10.5;
let laterYears = myAge-2;
laterYears *=4;

console.log(laterYears);
console.log(earlyYears);

//my age in dog years
let myAgeInDogYears= earlyYears + laterYears;
//my name and age in dog years
let MyName = “Enikardie”.toLowerCase();
console.log(My name is ${myName}. I am ${myAgeInDogYears} years old in dog years.);

Hey @enikardie!

It looks like you capitalized MyName here and not when you logged it to the console… is that the problem?

@stevencopeland

Thanks Steven. I need to start paying attention to small details like that.

1 Like

Did anyone else notice that this project interprets Dog Years incorrectly?

1 Like

Have you investigated this, at all? Please inform us.

You’re right! I couldn’t imagine it was asking me to imagine how many human years old i’d be if i was a dog, but re-reading it, I see it was.

If I were a dog I’d be dead af.
If dogs could live to be as old as I am then the equation for dog years would be totally different.
What’s the state of a 90 year old dog?
Is it an equivalent to the state of a 373 year old person?
What’s the state of a 373 year old person?
If a human lifespan is at most 120 years, a 373 year old person has been dead at least 253 years.
Does age increase after death?
If I died today, would I be one day older tomorrow?
I’d say no.
etc …

Mathematically, yes, it interprets dog years correctly.
Existentially, it is totally absurd.

This was fun.

Like in Calculus, there are limits and approximations. Depending upon the size of the dog, life span ranges from about eight to eightteen years. However, they are mature after about two years, and after around twelve years their metabolism has slowed to approximate that of humans.

Working from life expectancy for a human being, say, 75, and for a dog, say 15, we can work this backward…

maturity    21    2    =>   21 / 2 == 10.5
seniority   61   12

            40   10    =>   40 / 10 == 4