bharbron / hexbook-semantic

An Electron-React-Redux-Semantic-UI application for automatically generating a hexcrawl campaign notebook from random tables.
5 stars 3 forks source link

Replace .map() with .forEach() where preferable #26

Closed bharbron closed 5 years ago

bharbron commented 6 years ago

Downside of learning as I code: using some things incorrectly. There's a lot of places in code where I'm iterating over arrays using .map() where I should be using .forEach() (or maybe even .reduce()) instead. Basically, it's anyplace where I'm not actually trying to build a new array, I'm just trying to perform an action on each item in an array.

Fix this! Bad javascript abounds!

bharbron commented 6 years ago

Additionally, should look at replacing almost every instance of for loops with .map() or .forEach() (whichever is appropriate to the use case). This is less critical and more for code cleanliness.

bharbron commented 5 years ago

This is done