Math.imul

imul — Returns the product of two numbers that are treated as 32-bit signed integers.

Description

Math.imul(number num1, number num2)

Parameters

Name Description Type Default Optional
num1 number No
num2 number No

Examples

Example #1 – imul example
console.log(Math.imul(3, 4)); // 12 console.log(Math.imul(8, 11)); // 88 console.log(Math.imul(-3, '4')); // -12

External references