I have the following code.
var eqn = c1 + q1 + q2 + ‘ + ‘ + c2 + w1 + w2 + ‘=‘ + c3 + e1 + e2;
This code combines strings not add numbers.
I think it would be best to modify this string by using an array which I can do. My question is I want to remove the variable if it equals 1. For example if c1 == 1 then the variable should be defined like this: var eqn = q1 + q2 + ‘ + ‘ + c2 + w1 + w2 + ‘=‘ + c3 + e1 + e2; I want this to happen to any one or more variable that is equal to one. Is there a function or piece of code that can be used to do this?
2 + 2 + " + " + 3 + 3check your console..(2 + 2) + " + " + (3 + 3)