Math is a built-in object in JavaScript that contains different methods and properties used to perform mathematical operations. It contains the imul() function, which is used to compute 32-bit integer multiplication of two specified values.
Math.imul(param1, param2);
param1: This is the first input value of Number type for which we want to find the imul().
param2: This is the second input value of Number type for which we want to find the imul().
Number: It returns the 32-bit integer multiplication of the two parameters param1 and param2.If
Numberis not an integer, it is first converted into an integer.
console.log("imul(2,4) = " + Math.imul(2,4));console.log("imul(-10,10) = " + Math.imul(-10,-10));console.log("imul(0,4) = " + Math.imul(0,4));console.log("imul(3.34,4.2) = " + Math.imul(3.34,4.2));console.log("imul(-0.15,-4.11) = " + Math.imul(-0.15,-4.11));