Last active
November 17, 2016 20:01
-
-
Save diegocasmo/017da4fb582eef4ceaad94991359e197 to your computer and use it in GitHub Desktop.
upwork_count_work_diary_slots_by_task.js
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
var elements = document.getElementsByClassName('o-activity'); | |
var elementsArr = []; | |
for(var i = 0; i < elements.length; i++) | |
{ | |
elementsArr.push(elements.item(i).text); | |
} | |
var uniqueCount = {}; | |
elementsArr.forEach(function(i) { | |
uniqueCount[i] = (uniqueCount[i]||0)+1; | |
}); | |
console.log(uniqueCount); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment