const ages = [ 32, 33, 16, 40 ]; function checkAdult(ages) { return ages >= 18; } document.getElementById("demo").innerHTML = ages.filter(checkAdult);