I have an object which looks like this:

```
const object = {
head: 1,
eyes: 2,
arms: 2,
legs: 3
}

```

I want to loop over this object and this and log out each key name e.g. `eyes` for the amount of the value.

this would result in:

```
head
eyes
eyes
arms
arms 
legs 
legs
legs

```

Currently I have this solution but it feels like it could be done more neatly and readible.

```
Object.keys(object)
  .map(key => {
    return [...Array(object[key])].map( (_, i) => {
      return console.log(key)
   })

```

Any suggestions?