🍭Operations
In JavaScript, you can perform operations on numbers using the following methods:
Addition: You can add two numbers using the +
operator. For example:
Subtraction: You can subtract one number from another using the -
operator. For example:
Multiplication: You can multiply two numbers using the *
operator. For example:
Division: You can divide one number by another using the /
operator. For example:
Remainder: You can find the remainder of a division operation using the %
operator. For example:
In addition to these basic operations, JavaScript also provides a number of methods that you can use to manipulate numbers. For example, you can use the Math.round()
method to round a number to the nearest integer, or the Math.pow()
method to raise a number to a particular power.
Last updated