/reverse-polish-notation-js

Reverse polish notation calculator in JS

Primary LanguageJavaScriptMIT LicenseMIT

eval-reverse-polish-notation

What's reverse polish notation

Wikipedia knowledge on Reverse Polish Notation

Operations supported

  • addition, subtraction, multiplication, and division.

Examples

evalReversePolishNotation("2 5 3 + *");
// 16

evalReversePolishNotation("1 1 1 + +");
// 3