Multiplication(*) Arithmetic Operator in JavaScript

JavaScript arithmetic multiplication operator is used to find the product of operands. Like if we want the multiplication of any two numbers then this operator can be useful. 

Syntax:

a*b

Return: It returns the roduct of the operands.

Example 1: In this example, we will perform multiplication on Number.

Javascript




console.log(100*20);
console.log(Infinity*100);
console.log(Infinity*0);
console.log(NaN*100);


Output:

2000
Infinity
NaN
NaN

Example 2: In this example, we will perform multiplication on string/non-numbers.

Javascript




console.log("hello"*20);
console.log("100"*100);


Output: The string is converted to its corresponding number type and the string which does not contain any number is converted to NaN

NaN
10000

Supported Browser:

  • Chrome
  • Edge
  • Firefox
  • Opera
  • Safari

We have a complete list of Javascript Arithmetic operators, to check those please go through this JavaScript Arithmetic Operators article.


Contact Us