Skip to content

multiply

Multiplies the current number by the provided value and returns the product. It is a chainable readability helper around the * operator.

Usage

ts
const total = (6).multiply(7);

// 42

Parameters

NameTypeDescription
valuenumberMultiplier.

Returns

The product.

Type signature

ts
interface Number {
    multiply(value: number): number;
}

All packages are released under the MIT License.