Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gegeke/1c4a6d6a8d0796f9a5014d8cac013dc7 to your computer and use it in GitHub Desktop.
Save gegeke/1c4a6d6a8d0796f9a5014d8cac013dc7 to your computer and use it in GitHub Desktop.
Addition benchmarking using for Lodash _.forEach()
export const addSingle = (items, noItems) => {
return new Promise((resolve) => {
let sumData = 0
_.forEach(items, el => { sumData += el.data1 })
resolve(sumData)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment