Created
March 3, 2022 08:19
-
-
Save GerritRiesch94/b3377e76d77f3dcbb3e3b51d7269d078 to your computer and use it in GitHub Desktop.
SimpleRxJSFilterChain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { of } from 'rxjs'; | |
import { filter} from 'rxjs/operators'; | |
of(0815, 4711, 99, 98) | |
.pipe(filter((precinctNumber) => precinctNumber === 99)) | |
.subscribe((value) => console.log(`The coolest precinct: ${value}`)); | |
// Logs: | |
// The coolest precinct: 99 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment