JavaScript for Beginners

The Multiplication Operator (*) multiplies numbers:

 

Example :

 

<!DOCTYPE html>
<html>
<body>

<h1>JavaScript Arithmetic</h1>
<h2>The * Operator</h2>

<p id=”demo”></p>

<script>
let x = 5;
let y = 2;
let z = x * y;
document.getElementById(“demo”).innerHTML = z;
</script>

</body>
</html>   

 

Output

JavaScript Arithmetic

The * Operator

10

 

Description :

In JavaScript, multiplication is an arithmetic operation performed using the * operator. It is used to calculate the product of two or more numbers.