Skip to content

Basic Operations

The Mark edited this page Jan 25, 2023 · 1 revision

Features

  • subtract - Solve subtraction between 2 numbers.
  • Sum - Solve sum between 2 numbers.
  • divide - Solve division between 2 numbers.
  • multiply - Solve multiplication between 2 numbers.

Exemples

2. Solve subtraction between 2 numbers.

import TheMath from 'the-math';

const result = TheMath.subtract(10, 3);
// result: 7

3. Solve sum between 2 numbers.

import TheMath from 'the-math';

const result = TheMath.sum(14, 7);
// result: 21

4. Solve division between 2 numbers.

import TheMath from 'the-math';

const result = TheMath.divide(21, 3);
// result: 7

5. Solve multiplication between 2 numbers.

import TheMath from 'the-math';

const result = TheMath.multiply(6, 3);
// result: 18

Clone this wiki locally