Skip to content

Instantly share code, notes, and snippets.

View btwatts's full-sized avatar

Byron Watts btwatts

View GitHub Profile
@btwatts
btwatts / eBay average price
Last active May 8, 2021 23:57 — forked from danomoseley/eBay average price
Find an average sold price of an eBay search.Do a search for a product, check the "Sold listings" option under "Show only" in the left navigation.Run this script by pasting it into the console tab of the chrome developer tools.
function Stats(arr) {
var self = this;
var theArray = arr || [];
//http://en.wikipedia.org/wiki/Mean#Arithmetic_mean_.28AM.29
self.getArithmeticMean = function() {
var sum = 0, length = theArray.length;
for(var i=0;i<length;i++) {
sum += theArray[i];
}