- 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 Windows users, install by downloading the Windows installer.
For Mac users:
- Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Install Node using Homebrew:
brew install node
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:
- Open a new terminal in VS Code.
- To make sure you're in the right folder, run the command
ls
, you should see the filestory.js
. - Run the command
git add .
- Run
git commit -m "your message here"
. - Push to GitHub:
git push
.