GithubHelp home page GithubHelp logo

jsfoundations-conditionals's Introduction

Task

In this task, you'll create a calculator that has two numbers and an operation, and the calculator will perform the operation on those two numbers.

Example, the two numbers could be 3 and 5, and the operation could be +, then the calculator will add 3 and 5, and print to the user 3 + 5 = 8.

  1. Open this folder in Visual Studio Code.
  2. In calculator.js, create a variable for the first number.
  3. Create a second variable for the second number.
  4. Create a third variable for the operation (addition +, subtraction -, multiplication *, or division /).
  5. Use if-statements to check which operation the variable has.
  6. Perform the mathematical operation to the two numbers, and print the result to the user.

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. Navigate to project root (where calculator.js is).
  2. Run the command git add .
  3. Run git commit -m "your message here".
  4. Push to GitHub: git push.

jsfoundations-conditionals's People

Contributors

themshary avatar lailz avatar shamsah92 avatar

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.