The code is as follows:
let earlyYears = 2;
// 'Let', since the value will change.
earlyYears *= 10.5;
let laterYears = myAge - 2
// Later years is my age -2, and let since it will change later on.
laterYears = laterYears * 4
// Calculates dog years after 2 years old.
console.log(earlyYears);
console.log(laterYears);
let myAgeInDogYears = earlyYears + laterYears
// Addition. Siempre.
const myName = 'Hongpeng'.toLowerCase();
// My name in lower case.
console.log(`My name is ${myName}.
I am ${myAge} years old in human years, which is ${myAgeInDogYears} years old,
in dog years.`)
// Basically tells both human and dog age.
What we can learn:
Disclaimer: Part of a Codecademy course on JS.