I have a simple function, that should generate 1000 different elements:
var start = 0,
step = 0.0001
for (var i=0; i<1000; i++){
console.log(start);
start -= i*step;
console.log(start);
}
The trouble is that I'm getting not precisely what I've expected:
How do I get price numbers in that case? Actually I need 0 -0.0001 -0.0002 -0.0003 ...
should I round those numbers all the time or there is simplier solution?