- Open VS Code
- Click the settings icon in the bottom left corner, and open the
Command Palette.... - Search for "Prettier", then click "Install".
- Once it's done installing, restart VS Code.
- Click the settings icon in the bottom left corner again, and open the
Settings. - Search in settings for
Format On Save, and make sure the box is checked.
Install node
- For Mac users, install node using the macOS installer.
- For Windows users, install by downloading the Windows installer.
In this task, you'll write a script that has variables and uses console.log to print a little story.
-
Open this folder in Visual Studio Code.
-
In
story.js, define three variables that contain aname, anage, and ahobby. -
Using these variables, print the following story:
Mr./Mrs. NAME, in 33 years, you will be AGE_PLUS_33 years old. By then you'll have decades of HOBBY practice!
Example, if the variables are the following:
name: Msharyage: 25hobby: Meditation
The story goes:
Mr./Mrs. Mshary, in 33 years, you will be 58 years old. By then you'll have decades of Meditation practice!
To submit your work, simply push your code to GitHub.
After finishing the task and verifying your work, follow these steps to push your code to GitHub:
- Navigate to project root (where
story.jsis). - Run the command
git add . - Run
git commit -m "your message here". - Push to GitHub:
git push.