Another example using all the previous concepts in this chapter:
// Setting my age to a variablelet myAge =12;// Setting temp valuelet earlyYears =2;earlyYears *=10.5;let laterYears = myAge -2;laterYears *=4;// Checking the valuesconsole.log(earlyYears);console.log(laterYears);let myAgeInDogYears = earlyYears + laterYears;// Setting a name to a variablelet myName ='Johnson'.toLowerCase();// Printing down a statement with my age in human years and my age in dog yearsconsole.log(`My name is ${myName}. I am ${myAge} years old in human years which is ${myAgeInDogYears} years old in dog years.`);