const valores = [11,2,6,8,7,99,1,100];
function pares(array){
let par = [];
for(i = 0; i < array.length; i++){
if(array[i] %2 ===0) {
par.push(array[i]);
}
}
return par;
}
console.log(pares(valores));
[ 2, 6, 8, 100 ]