Dima_Dimov,

...
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.firstArray {
background: #FF6666;
}
.secondArray {
background: #339933
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function() {
var firsArr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
cecondArr = [3, 4, 5, 8, 9],
$span = $.map(firsArr, function(el) {
var cls = $.inArray(el, cecondArr) != -1 ? 'secondArray' : 'firstArray';
el = $('<span/>', {
'text': el,
'class': cls
}).appendTo('body')
return el
})
});
</script>
</head>
<body>
</body>
</html>