attached image
Code snippet
for (var i = 0; i <= 22; i++) {
var incbidsize = -11 + i;
var buyprices = buyprice + (bidsize * incbidsize ) ; // this is to start from backwards
var newprice = buyprices ;
Variable are taken from a form element
Just do not understand why cant the variable add up ?
var newprice is the 1.32 you see in the 1st column
i want it to increment by a variable instead of usual ++
the first value should be (1.32 - 0.11) = 1.21
second value should be 1.22
i try changing them to number using parsefloat
or change both to string using toString
but it does not work
other variables are adding correctly