Skip to content

Instantly share code, notes, and snippets.

@gegeke
Created June 7, 2019 16:08
Show Gist options
  • Save gegeke/092f20cedfca1ef9bd75a03ed63c92c0 to your computer and use it in GitHub Desktop.
Save gegeke/092f20cedfca1ef9bd75a03ed63c92c0 to your computer and use it in GitHub Desktop.
Addition benchmarking using $.each()
export const addSingle = (items, noItems) => {
return new Promise((resolve) => {
let sumData = 0
$.each(items, (i, el) => {
sumData += el.data1
})
resolve(sumData)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment