Created
November 18, 2018 08:29
-
-
Save cwetanow/d901209da53045ce31a02c11740f1268 to your computer and use it in GitHub Desktop.
This file contains 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
macros = [...$('.total')[0].children].splice(2, 3).map(el => +el.innerText); | |
cals = macros[0] * 4 + macros[1] * 9 + macros[2] * 4; | |
$('.total')[0].children[1].innerText = cals; | |
goalMacros = [...$('.total')[1].children].splice(2, 3).map(el => +el.innerText); | |
goalCals = goalMacros[0] * 4 + goalMacros[1] * 9 + goalMacros[2] * 4; | |
$('.total')[2].children[1].innerText = goalCals - cals; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment