link to the challenge : https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union

why my code is returning an empty array `arr1 = [] ? `

Here is my code :

```
function uniteUnique(arr) {
let arr1 = [];
for(let i = 0; i < arr.length; i++){
for(let j = 0; j < arr[i].length; j++){
if(arr1.indexOf(arr[i][j]) === -1){
arr1.push(arr[i][j]);
}
}
}
return arr1;
}
console.log(uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]));
```