for some weird reason, it doesn't work worth a tinker's damn. it appends when i need it to increment. yes, i've read this, and this aaaand this (which doesn't work), but they don't really help (at all) with such a simple case. :poop: what i am trying to do, is this:
var status = 0;
console.log('status: '+status);
status += 1;
console.log('status: '+status);
status += 2;
console.log('status: '+status);
status += 3;
console.log('status: '+status);
...
but all it outputs is 0,01,012,0123
instead of 0,1,3,6
. yes, it's simple, but that's what i need for this particular implementation and the stuff that connects to it. also, the steps matter; otherwise, i'd just status++
and i obviously don't want twenty-six lines of that either. DRY, right?
i've tried to do this, var status = Number(0);
and var status = parseInt(0)
for fun (no way it would work, but try anyway) and even tried status = status + 1'
(pointless variant, but cover the bases...) and none work. what am i missing? i understand this, yet don't know how to make 0 == Number(0)
, as it were. i thought the increment existed to prevent kind of fumbuckery... its stupid math, for heaven's sake...
so. how do i force the zero to be a Number so the increment can work as needed and output anumber at each step along the way?