Technical error Chat GPT showes incorrect result

function findOdd(arr) {
return arr.reduce((result, num) => result ^ num, 0);
}

const array1 = [1, 1, 2, 1];
const array2 = [17, 17, 3, 17, 17, 17, 17];

console.log(findOdd(array1)); // resut: 2 (This is wrong)
console.log(findOdd(array2)); // result: 3