Giter Site home page Giter Site logo

jsfoundations-variables's Introduction

Setup

Install Visual Studio Code

Click here to download

Install Prettier in Visual Studio Code

  1. Open VS Code
  2. Click the settings icon in the bottom left corner, and open the Command Palette....
  3. Search for "Prettier", then click "Install".
  4. Once it's done installing, restart VS Code.
  5. Click the settings icon in the bottom left corner again, and open the Settings.
  6. 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:

  1. Install Homebrew:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install Node using Homebrew:
    brew install node

Task

In this task, you'll write a script that has variables and uses console.log to print a little story.

Steps

  1. Open this folder in Visual Studio Code.

  2. In story.js, define three variables that contain a name, an age, and a hobby.

  3. 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: Mshary
  • age: 25
  • hobby: 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!

Submission

To submit your work, simply push your code to GitHub.

Steps

After finishing the task and verifying your work, follow these steps to push your code to GitHub:

  1. Open a new terminal in VS Code.
  2. To make sure you're in the right folder, run the command ls, you should see the file story.js.
  3. Run the command git add .
  4. Run git commit -m "your message here".
  5. Push to GitHub: git push.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.