Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created February 11, 2022 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/51116f2ef2705e99e1baa037c66c74d2 to your computer and use it in GitHub Desktop.
Save codecademydev/51116f2ef2705e99e1baa037c66c74d2 to your computer and use it in GitHub Desktop.
Codecademy export
let myAge = 44; //My age is 44 years old. Creating a variable named myAge and setting up its vavlue to 44.
let earlyYears = 2; // creating a variable named earlyYears and stored the value 2 to it.
earlyYears *= 10.5;
myAge -= 2;
let laterYears = myAge; // Creating a variable named lateYears subtracting 2 from the variable myAge.
laterYears *= 4; // Multiplying the variable laterYears by 4 to calculate the number of dog years.
console.log (earlyYears);
console.log (laterYears);
myAgeInDogYears = earlyYears + laterYears; // adding variables earlyYears and laterYeaars.
myName = 'Ricardo'.toLowerCase();//Returning the string RICARDO in lower cases.
myAge += 2
console.log (`My name is ${myName}. 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