BACK
PracticeReal-life: skip() a system event
PRACTICE · 07 · 練

Real-life: skip() a system event

The first init event is internal. Skip it with skip(1).

  1. Solve the task in the editor — no long theory.
  2. Run the check and compare your output with the expected result.
  3. Stuck? Open the solution and carry the approach into your own code.
Solution spoiler · click to reveal
const { from, skip } = Rx;

const events = ['init', 'ready', 'click'];

const result$ = from(events).pipe(
  skip(1)
);

result$.subscribe(value => console.log(value));
script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...