Question: I have two arrays and I would like to compare if these arrays have duplicated values, then return the values that aren't duplicates. Based on these two arrays I would like to return the string `Eucalipto`.

```js
const plants = [
  {
    id: 59,
    kind: "Cana-de-açucar"
  },
  {
    id: 60,
    kind: "Citros"
  }
];

const auxPlants = [
  "Cana-de-açucar",
  "Citros",
  "Eucalipto"
]
```

Answer: 
You can use `Array#map` to find all the `kind` values, pass that to the `Set` constructor, and then use `Array#filter` to find all elements of the array not in that `Set`.

```js
const plants = [
  {
    id: 59,
    kind: "Cana-de-açucar"
  },
  {
    id: 60,
    kind: "Citros"
  }
];
const auxPlants = [
  "Cana-de-açucar",
  "Citros",
  "Eucalipto"
];
const set = new Set(plants.map(({kind})=>kind));
const res = auxPlants.filter(x => !set.has(x));
console.log(res);
```
This is the solution to it, I have explained it's working using comments

```js
// create a set in order to store values in it
// assuming you have unique values
let set = new Set();
// iterating over array of object and storing the value of 'kind' in the set
for(obj of plants){
  set.add(obj.kind);
}

// iterating over array and checking for values in set, 
// if not in set then printing it
for(ele of auxPlants){
  if(!set.has(ele)){
    console.log(ele);
  }
}
```