gt
gt() function
Returns true if the first argument is greater than the second; false otherwise.
Signature:declare function gt(a: Date, b: Date): boolean;
declare function gt(a: Date): (b: Date) => boolean;
declare function gt(a: string, b: string): boolean;
declare function gt(a: number, b: number): boolean;
declare function gt(a: string): (b: string) => boolean;
declare function gt(a: number): (b: number) => boolean;
Example
gt(5, 1) // expected true
gt(1, 5) // expected false
gt("a", "b") // expected false
gt("b", "a") // expected true
filter(gt(5), [1, 2, 4, 5, 8, 9]) // Iterable<[1, 2, 4]>
filter(gt(1), [1, 2, 3, 4, 5]) // Iterable<[]>
filter(gt("b"), ["a", "b", "c"]) // Iterable<["a"]>
filter(gt("a"), ["a", "b"]) // Itreable<[]>