let cur = x[1];
let exp = x[2];
 let nex = (x[1])/(x[1]*x[2]);
let mmu = (nex*cur);
 y[1] = roundVal(nex, 2);
y[2] = roundVal(mmu, 2);
 if(x[1]<=0){y[3] = 'C must be greater than exp';}

On the last line, I have result  displayed as Text, and as you can see I included the variable “exp” in the text, but its in frontend when user calculates “exp” appears instead of its value. How do I add variable, for instance, x[1], within a text so that in frontend it correctly displays as its value?

CalcHub Answered question March 8, 2023