Array comprehension is concise JavaScript syntax for producing a new array by combining iteration with filtering. It focuses on the desired output rather than loop mechanics. section 3.3
Filter people while selecting their names
const names = [for (p of people) if (p.birthYear === 1903) p.fullname]\n .join(' and ');\n\n// 'John von Neumann and Alonzo Church'\n\nThis combines the filtering performed by filter with the transformation performed by map. section 3.3
[for (p of people) if (p.birthYear === 1903) p.fullname]
.join(' and ');
View the complete comprehension example that selects people born in 1903 and joins their names. section 3.3





