Math.imul Function in JavaScript



The imul() function of the Math object accepts two numbers and returns the result of C-like 32-bit multiplication of the given numbers.

Syntax

Its Syntax is as follows

Math.imul(47, 56);

Example

 Live Demo

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var result = Math.imul(47, 56);
      document.write("Result: "+result);
   </script>
</body>
</html>

Output

Result: 2632
Updated on: 2020-06-25T12:30:30+05:30

90 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements