JSFiddle - React, Tailwind, and code Playground
JavaScript
function solution(A) {
A.sort().reduce((accumulator, currentValue) => {
console.log(accumulator, currentValue)
if(accumulator !== currentValue) {
return currentValue;
}
})
}
console.log(solution([9,3,9,3,9,7,9]));