Created
June 5, 2019 10:25
-
-
Save gegeke/3aa6bd7ce27b03a722ac65dde86bd43d to your computer and use it in GitHub Desktop.
Addition benchmarking with for i++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const addSingle = (items, noItems) => { | |
return new Promise((resolve) => { | |
let sumData = 0 | |
for (let i = 0; i < noItems; i++) { | |
sumData += items[i].data1 | |
} | |
resolve(sumData) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment