Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 591 Bytes

File metadata and controls

26 lines (22 loc) · 591 Bytes

simple-math-eval-calc

A simple small code replacement for js eval

What It Can Do ?

It can accept mathematical expression based on a string only.

What Operations It Accept?

It accepts currently only:

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Exponentation

Examples of use:

Eval(" 1 + 1"); //returns 2
Eval("10 - 5"); //returns 5
Eval("6 * 2"); //returns 12
Eval("14 / 7"); //returns 2
Eval("2 ^ 2"); //returns 4
THIS IS MIT THE LICENSED VERSION OF SIMLPLE-MATH-EVAL-CALC