Question: In this lab, you will learn how to use arithmetic operators for performing various operations such as addition, subtraction, and so on . Complete the
In this lab, you will learn how to use arithmetic operators for performing various operations such as addition, subtraction, and so on
Complete the given code in the JavaScript block by performing the following tasks:
Addition: Add the variables var and var and store the sum in the variable result.
Multiplication: Multiply the variables var and var and store the multiplication in the variable result.
Subtraction: Subtract the variables var and var and store the difference in the variable result.
Division: Divide the variables var and var and store the quotient in the variable result.
Modulus: Find the remainder of the variables var and var and store the remainder in the variable result.
Note: In the JavaScript block, replace the comments with the appropriate code, if required.
Sample input:
Copy
sum
mul
sub
div
rem
Sample output:
Copy
The addition of variables is:
The multiplication of variables is:
The subtraction of variables is:
The division of variables is:
The remainder of variables is:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
