MrFlatman,
function mass_two() {
var n = 3,
m = 5;
var mas = [];
var sum = []
for (var i = 0; i < m; i++) {
mas[i] = [];
for (var j = 0; j < n; j++) {
mas[i][j] = Math.floor(Math.random() * 30) + 1;
sum[j]= (sum[j]||0) + mas[i][j] * !(mas[i][j] % 2);
}
}
console.log(mas);
console.log(sum);
}
mass_two()