Skip to content

Instantly share code, notes, and snippets.

@Sekiphp
Created February 12, 2019 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sekiphp/59649a620dbb2c3fb1972d157c53a3c3 to your computer and use it in GitHub Desktop.
Save Sekiphp/59649a620dbb2c3fb1972d157c53a3c3 to your computer and use it in GitHub Desktop.
var sumAdd = 0;
var sumRemoved = 0;
jQuery('.lines-added').each(function() {
sumAdd += parseInt((jQuery(this).html()), 10);
});
jQuery('.lines-removed').each(function() {
sumRemoved += parseInt((jQuery(this).html()), 10);
});
console.log(sumAdd);
console.log(sumRemoved);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment