thanEvery()

Checks whether the primitive value of a specified object is greater than every value of the given values

Greater.prototype.thanEvery()

Checks whether the primitive value of a specified object is greater than every value of the given values.

greater.class.ts
public thanEvery(...values: number[]): boolean {
  return Array.isArray(values)
    ? values.every((value) => this.valueOf() > value)
    : false;
}

Parameters

...values:number[]

A rest parameter of the numbers to test.

Return type

Returns

The return value is a boolean indicating whether the primitive value is greater than every value of the given values.

Example usage

Last updated