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

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 25-Jun-2020

48 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements