-
-
Save codecademydev/51116f2ef2705e99e1baa037c66c74d2 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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