GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — javascript-2/numbers/operators.md at master · JavaScipt-Dev/javascript-2

Expand file tree

/

operators.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
30 lines (24 loc) · 693 Bytes
/

operators.md

Copy path

File metadata and controls

30 lines (24 loc) · 693 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

Operators

You can apply mathematic operations to numbers using some basic operators like:

  • Addition: c = a + b
  • Subtraction: c = a - b
  • Multiplication: c = a * b
  • Division: c = a / b

You can use parentheses just like in math to separate and group expressions: c = (a / b) + d

{% exercise %} Create a variable x equal to the sum of a and b divided by c and finally multiplied by d. {% initial %} var a = 2034547; var b = 1.567; var c = 6758.768; var d = 45084;

var x = {% solution %} var a = 2034547; var b = 1.567; var c = 6758.768; var d = 45084;

var x = ((a + b) / c) _ d; {% validation %} assert(x === (((a + b) / c) _ d)); {% endexercise %}

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.