Introduction To Programming (*) is used for multiplication(/) is used for division(%) is the modulo operator.You can multiply numbers and number variables. When you multiply a number and a string the string will be converted to a number by JavaScript. Even when you multiply a string by a string JavaScript will convert the strings to numbers, if it can.
You can divide numbers and variables. When you divide a number and a string the string will be converted to a number by JavaScript. Even when you divide a string by a string JavaScript will convert the strings to numbers, if it can.
The modulo operator is very simple. Remember back in elementary school when you learned to do division manually? They called it "long division" in my era. The modulo operator just gives you the remainder when you divide two numbers.
Here's how we code it in JavaScript.
And here's more examples.