I'm new to Javascript.
I have a script with lots of calculations. Everything is working great except I have a variable called J14 and the user is able to set this value from the interface. Lets say it equals 30000 for now. It seems to work through the calculations but as soon as I use J14 in an If statement condition, it replaces the value of J14 with 0. I have no idea why it would do this as I'm not assigning the variable, I'm simply checking it against 0.
Before this statement I can output the value of J14 and it's 30000 as expected, however, if I output J14 after this statement it's value is 0. So the condition is assigning the value. I can then no longer use J14 in the script but I need to use it in the If statement following this one. I probably have syntax error for doing this kind of thing but can't quite figure out the terminology for a successful google for a solution.
if (J14 = 0)
{
J59 = (J15 + J16) * 75;
}
else
{
J59 = J15 * F75;
}