var i = 1;
var j = i++;
assert(1, j);
assert(2, i);

var i = 1;
var j = i--;
assert(1, j);
assert(0, i);

var i = 1;
var j = --i;
assert(0, j);
assert(0, i);

var i = 1;
var j = ++i;
assert(2, j);
assert(2, i);

var i = 1;
i += 1; assert(2, i);
i -= 1; assert(1, i);
i *= 2; assert(2, i);
i /= 2; assert(1, i);

var b = true;
b &= false; assert(false, b);
b |= true; assert(true, b);

Last edited Oct 11, 2009 at 12:58 PM by sebastienros, version 1

Comments

No comments yet.