---
title: "Comment by TypeC on \"Using Loops in JavaScript\" | Hashnode"
description: "There&#39;s another way to do a loop in Javascript using ES6 syntax. let numberArr = [ 1 , 2 , 3 , 4 , 5 ]; numberArr.map(number = &gt; { console.log(number) })"
url: "https://hashnode.com/posts/using-loops-in-javascript/626bd3b36072cdb96d149b5f/comment/626befc3b7dcabd258e74424"
---

[Discussion](https://hashnode.com/posts/using-loops-in-javascript/626bd3b36072cdb96d149b5f)

Comment [Using Loops in JavaScript](https://hashnode.com/posts/using-loops-in-javascript/626bd3b36072cdb96d149b5f)

[TypeC](https://hashnode.com/@typec)

[Apr 29, 2022](https://hashnode.com/posts/using-loops-in-javascript/626bd3b36072cdb96d149b5f/comment/626befc3b7dcabd258e74424)

There's another way to do a loop in Javascript using ES6 syntax.

```
let numberArr = [1, 2, 3, 4, 5];
numberArr.map(number => {
    console.log(number)
})
```
