How to create a system that solves subtraction, multiplication, division, and addition using JavaScript?

I’ve edited the post to clear that up.