Čisté WPM0
WPM0
Přesnost100%
Uplynulý čas0s
Čas—
Znaky0
Nesprávně0
Chyby0
Pokrok0%
Caps Lock zapnutý

Průvodce rychlým čtením kódu

Programovací jazyk
JavaScript
Obtížnost
Střední

Filter active records and return their names.

const users = [
  { name: "Ari", active: true },
  { name: "Bea", active: false },
  { name: "Kai", active: true },
];

const names = users
  .filter((user) => user.active)
  .map((user) => user.name);