100devs-calculator icon indicating copy to clipboard operation
100devs-calculator copied to clipboard

Answer

Open Luka-DV opened this issue 1 year ago • 0 comments

I completed the challenge: 5 I feel good about my code: 2

I wanted to create a calculator that could take different operations at once and execute them correctly (i.e. division before adding etc.). I didn't know how to write the code with an object like I would for a "just one operation at a time" calculator, so I wrote the getResult method with the Function constructor which I think is not the best practice (but better than eval()) is it?

Luka-DV avatar Sep 19 '23 16:09 Luka-DV