2014-10-10 23:23:12 +02:00
|
|
|
//// [bitwiseCompoundAssignmentOperators.ts]
|
2014-10-04 19:10:55 +02:00
|
|
|
var a = true;
|
|
|
|
var b = 1;
|
|
|
|
a ^= a;
|
|
|
|
a = true;
|
|
|
|
b ^= b;
|
|
|
|
b = 1;
|
|
|
|
a ^= b;
|
|
|
|
a = true;
|
|
|
|
b ^= a;
|
|
|
|
b = 1;
|
|
|
|
|
|
|
|
var c = false;
|
|
|
|
var d = 2;
|
|
|
|
c &= c;
|
|
|
|
c = false;
|
|
|
|
d &= d;
|
|
|
|
d = 2;
|
|
|
|
c &= d;
|
|
|
|
c = false;
|
|
|
|
d &= c;
|
|
|
|
|
|
|
|
var e = true;
|
|
|
|
var f = 0;
|
|
|
|
e |= e;
|
|
|
|
e = true;
|
|
|
|
f |= f;
|
|
|
|
f = 0;
|
|
|
|
e |= f;
|
|
|
|
e = true;
|
|
|
|
f |= f;
|
|
|
|
|
2014-10-10 23:23:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
//// [bitwiseCompoundAssignmentOperators.js]
|
|
|
|
var a = true;
|
|
|
|
var b = 1;
|
|
|
|
a ^= a;
|
|
|
|
a = true;
|
|
|
|
b ^= b;
|
|
|
|
b = 1;
|
|
|
|
a ^= b;
|
|
|
|
a = true;
|
|
|
|
b ^= a;
|
|
|
|
b = 1;
|
|
|
|
var c = false;
|
|
|
|
var d = 2;
|
|
|
|
c &= c;
|
|
|
|
c = false;
|
|
|
|
d &= d;
|
|
|
|
d = 2;
|
|
|
|
c &= d;
|
|
|
|
c = false;
|
|
|
|
d &= c;
|
|
|
|
var e = true;
|
|
|
|
var f = 0;
|
|
|
|
e |= e;
|
|
|
|
e = true;
|
|
|
|
f |= f;
|
|
|
|
f = 0;
|
|
|
|
e |= f;
|
|
|
|
e = true;
|
|
|
|
f |= f;
|