const stray = nums => nums.reduce((a, b) => a ^ b);
I found someone use ^ symbol this way.
Any meaning? Like a normal regular expression?
it was used in this codewars problem : Find the stray number | Codewars
const stray = nums => nums.reduce((a, b) => a ^ b);
I found someone use ^ symbol this way.
Any meaning? Like a normal regular expression?
it was used in this codewars problem : Find the stray number | Codewars
Here’s an SO post about it: math - What does the ^ (caret) symbol do in JavaScript? - Stack Overflow