Created
March 4, 2016 07:44
-
-
Save lukyth/014f844d7f35b5eaf0bd to your computer and use it in GitHub Desktop.
This file contains 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 feed = document.querySelectorAll('.alert') | |
var feedType = {} | |
feed.forEach(function(el){ | |
(el.classList).forEach(function(className){ | |
if (feedType[className]) { | |
feedType[className] += 1 | |
} else { | |
feedType[className] = 1 | |
} | |
}) | |
}) | |
console.log(feedType) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment