TwójStaryToUrna

mail@pastecode.io avatar
unknown
javascript
2 years ago
451 B
2
Indexable
Never
const characters = [
  { name: 'James T. Kirk', series: ['Star Trek'] },
  { name: 'Spock', series: ['Star Trek', 'Star Trek: The Next Generation'] },
  { name: 'Jean-Luc Picard', series: ['Star Trek: The Next Generation'] },
  { name: 'Worf', series: ['Star Trek: The Next Generation', 'Star Trek: Deep Space Nine'] }
];

const tngCharacters = characters.filter(character => {
  return character.series.includes('Star Trek: The Next Generation');
});