Skip to content

Instantly share code, notes, and snippets.

@mwygoda
Last active September 19, 2018 07:35
Show Gist options
  • Select an option

  • Save mwygoda/aa507ce274b692484a72d9030a7f077a to your computer and use it in GitHub Desktop.

Select an option

Save mwygoda/aa507ce274b692484a72d9030a7f077a to your computer and use it in GitHub Desktop.
$('td:contains("2.0")').parent().remove();
$('td:contains("k.cz.")').parent().remove();
var sumOfEcts = 0;
var sumOfNotes = 0;
$('td[title="ocena"]').each(function(){
sumOfNotes += parseFloat($(this).text()) * parseFloat($(this).next().next().text());
sumOfEcts += parseFloat($(this).next().next().text());
});
console.log('twoja średnia to:', sumOfNotes/sumOfEcts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment