Ad

Find the number that only odd times form an array.

For example:

findOnlyOddTimesNumber([1,1,1,2,3,4,2,4,2,1,3]); // 2 
const findOnlyOddTimesNumber = arr => arr.reduce((p,c) => p^c);

findOnlyOddTimesNumber([1,1,1,2,3,4,2,4,2,1,3]);