Challenge 2: Convert to Dog Years
Write a function dogYears () that takes in a person’s age in human years as the parameter and converts it to dog years. Assume 1 Human year is equivalent to 7 dog years. Then, log the result to the console with the message “Your age in dog years is [dogAge]”.
For your human year, please use 18 & 10.
Here is the input you should enter:
console.log(dogYears(18))
console.log(dogYears(10))
And here is the output you should get after you write proper code for this challenge:
Your age in dog years is 126 Your age in dog years is 70