// returns an array that indicates wheter list[n] is a minor or adult let list = [14, 10, 48, 29, 18, 21], status = (a) => { return (a >= 18) ? 'adult' : 'minor'; }; console.log(list.map(x => status(x)));