Skip to content

DaniaAlAli/JSFoundations-Conditionals

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%