Created
August 25, 2022 11:41
-
-
Save QuocCao-dev/e95837e97272743eba9969e1e61acd89 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /** | |
| 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