I'm trying to convert the code below from jquery to javascript but I can not figure out how I can do. can anyone help me?
$('*').each(function(i, el){
var $element = $(el),
color = $element.css('background-color');
if(!~$.inArray(color, colors))
colors.push(color);
});
Thanks in advance