Referencemax
Reference · 74
max
max
Finds the maximum value of a finite stream.
Signature
max(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction
What it does
Compares the values and, after complete, emits the largest. You can pass a comparer for objects or custom ordering.
When to use
Aggregating finite sets: the highest price, the latest timestamp, the largest score.
See also
min, reduce, toArray
script.ts
CONSOLE · Console output
Hit Run to see the result...