Last active
August 29, 2015 13:59
-
-
Save dsimmons/10764722 to your computer and use it in GitHub Desktop.
Rev.com browser console stats
This file contains hidden or 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
| $rows = $('#orders-history tbody tr'); | |
| // Sum the cost of all orders placed. | |
| costTotal = [].reduce.call($('td:nth-child(7)', $rows).map(function(i, el) { return Number(el.innerHTML.replace(/[^0-9\.]+/g, "")); }), function(sum, current) { return sum + current; }) | |
| // Average audio file duration | |
| avgDuration = costTotal / $rows.length; | |
| console.log("Total cost: $" + costTotal); | |
| console.log("Average call duration: " + avgDuration + "m"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment