jozps2
01-14-2004, 06:49 AM
how do i add a number to a variable?? for example i have document.write(" = " + passedData[o]+"<br />"); and i want to add 1 to passedData[o] so that if passedData[o] was equal to 1 the new number would be 2
this is what i have right now:
document.write(" = " + passedData[o]+(+1)+"<br />");
but that gives me 1+1= 11 instead of 1+1= 2
this is what i have right now:
document.write(" = " + passedData[o]+(+1)+"<br />");
but that gives me 1+1= 11 instead of 1+1= 2