DEV Community

Discussion on: Javascript: The trend!

 
michaelcurrin profile image
Michael Currin

Indeed.

You can also use for...of, which doesn't take a function like map or forEach

for (const x of myArray) {
 console.log(x)
}
Enter fullscreen mode Exit fullscreen mode