---
title: "Comment by Ashiru Olawale on \"Array.flat()\" | Hashnode"
description: "console.log( array .flat( Infinity )); will flat an array any level deep"
url: "https://hashnode.com/posts/arrayflat/5feb6a27b2cf2458fe323505/comment/5feb921d017ebb59232da158"
---

[Discussion](https://hashnode.com/posts/arrayflat/5feb6a27b2cf2458fe323505)

Comment [Array.flat()](https://hashnode.com/posts/arrayflat/5feb6a27b2cf2458fe323505)

[Ashiru Olawale](https://hashnode.com/@walebant)

[Dec 29, 2020](https://hashnode.com/posts/arrayflat/5feb6a27b2cf2458fe323505/comment/5feb921d017ebb59232da158)

```
console.log(array.flat(Infinity));
```

will flat an array any level deep
