Last active
January 4, 2018 01:09
-
-
Save mintchaos/676953453d43b06d1cb353fd4c161ba7 to your computer and use it in GitHub Desktop.
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
// Find all of the boxes with totals | |
$$('.wht_total') | |
// Take off the $ and turn it into a number (instead of a word made out of digits) | |
.map(el => Number(el.innerText.slice(1))) | |
// Remove any that aren't numbers (the "Total" at the top is included) | |
.filter(n => !isNaN(n)) | |
// Add everything together | |
.reduce((t, c) => t+c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment