1.
var a = [ 8, 5, 9, 6, 7, 7, 1, 8, 9, 4 ];
var b = a.slice();
2.
var a = [ 3, 2, 6, 2, 9, 4, 5, 3, 6, 5 ];
var b = a.reduce(function(x, y) {
return x + y;
}, 0);
3.
var a = [ 2, 5, 4, 7, 3, 5, 3, 4, 8, 8, ];
var b = 5;
var result = 0;
a.forEach(function(item, i, arr) {
if(item == b) result++;
});
alert(result + " вхождения");