I just stumbled upon a bit of code that I can't find anything about:
function solution(A) {
var agg = 0;
for(var i=0; i<A.length; i++) {
agg ^= A[i];
}
return agg;
}
What does the ^=
operator do?
This code is the solution to a problem on Codility.