# [JavaScript] forEach with Maps and Sets

```
// Maps
const currencies = new Map([
  ['USD', 'United States dollar'],
  ['EUR', 'Euro'],
  ['GBP', 'Pound sterling'],
]);

currencies.forEach(function (value, key, map) {
  console.log(`${key}: ${value}`);
});

//Sets
const currenciesUnique = new Set(['USD', 'GBP', 'USD', 'EUR', 'EUR']);
console.log(currenciesUnique);
currenciesUnique.forEach(function (value, _, map) {
  console.log(`${value}: ${value}`);
});
```

![forEach with maps and sets.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1656000008867/Lw9VfsAaP.PNG align="left")

```
Set
``` does not have any key or index here. 

