JSFiddle - React, Tailwind, and code Playground
JavaScript
x = "4"
op1 = "+"
y = "5"
op2 = "-"
z = "3"
var result = eval(x + op1 + y + op2 + z);
alert(result);
x = "4"
op1 = "+"
y = "5"
op2 = "-"
z = "3"
var result = eval(x + op1 + y + op2 + z);
alert(result);