Skip to content

Instantly share code, notes, and snippets.

@nilsFK
Last active January 10, 2020 10:34
Show Gist options
  • Save nilsFK/83a0942ceadb5d0c9a215d90b542afde to your computer and use it in GitHub Desktop.
Save nilsFK/83a0942ceadb5d0c9a215d90b542afde to your computer and use it in GitHub Desktop.
bytbil.com - get average car price (including VAT)
// bytbil.com - Get average car price (including VAT) for all cars on a given page with console.
var arr = $(".car-price-main").toArray().map((x) => parseInt(x.innerText.replace(/\s|kr/g, ''))); console.log(arr); (arr.reduce((a, b) => a + b, 0)) / arr.length;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment