JS Built-ins
← Math134 / 215
Mathimulbeginner

Math.imul() β€” Zero Multiplier

πŸ“– Usage Example
// 32-bit integer multiplication (C-like overflow)
Math.imul(3, 4)    // β†’ 12
Math.imul(-1, 8)   // β†’ -8

Use Math.imul() for fast 32-bit integer multiplication with C-like overflow semantics, useful in hashing or WebAssembly.

Math.imul()

Performs C-like 32-bit integer multiplication.

Challenge: Verify that Math.imul(0, 5) returns 0.

πŸ’‘ Hints (1)
  • β€’ Anything multiplied by zero is zero