Well I know the best solution is using the hash approach, however I implement my solution using Map structure from Javascript, it is pretty simple.
// Time complexity O (n log(n))
function findFirstUnique(arr) {
const newMap = new Map();
for (value of arr) {
if (!newMap.has(value)) {
newMap.set(value, 1);
} else {
newMap.delete(value);
}
}
const iterator = newMap.keys();
return iterator.next().value || null;
}