Multiplication(*) Arithmetic Operator in JavaScript (original) (raw)

Last Updated : 14 Mar, 2023

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(10020); console.log(Infinity100); console.log(Infinity0); console.log(NaN100);

`

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:

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