Arithmetic Operations
In addition to text and numbers, we can also print the results of arithmetic operations.
The basic arithmetic operations in JavaScript are as follows:
- + (addition)
- - (subtraction)
- * (multiplication)
- / (division)
For example:
console.log(10 + 1);
console.log(10 - 5 / 5);
Will print:
11
9
Note that if you put the expression in quotation marks, it will print exactly as written, because it is treated as text. For example:
console.log("10 + 1");
Will print:
10 + 1
Instructions
On the first line, insert the following command:
console.log(10 * 10);
On the second line, insert the same command with quotation marks:
console.log("10 * 10");
Start programming for free
3/10