Skip to content

Instantly share code, notes, and snippets.

@QuocCao-dev
Created August 25, 2022 11:41
Show Gist options
  • Save QuocCao-dev/e95837e97272743eba9969e1e61acd89 to your computer and use it in GitHub Desktop.
Save QuocCao-dev/e95837e97272743eba9969e1e61acd89 to your computer and use it in GitHub Desktop.
/**
1. Create a variable named `myAge`, and set it equal to your age as a number.
Write a comment that explains this line of code.
*/
// my current age
const myAge = 26;
// early age
let earlyYears = 2;
earlyYears *= 10.5;
let laterYears = myAge - 2;
laterYears *= 4;
console.log(earlyYears);
console.log(laterYears);
const myAgeInDogYears = earlyYears + laterYears;
const myName = "Quoc".toLowerCase();
console.log(
`My name is ${myAge}. I am ${myAge} years old in human years which is ${myAgeInDogYears} years old in dog years.`
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment