Ad
Code
Diff
  • var add1 = 0;
    var add2 = 0;
    
    var minus1 = 0;
    var minus2 = 0;
    
    var times1 = 0;
    var times2 = 0;
    
    var exponet1 = 0;
    var exponet2 = 0;
    
    var divide1 = 0;  //Division with decimal
    var divide2 = 0;
    
    var divide3 = 0; //Division with remainder
    var divide4 = 0;
    
    var y = 15;
    console.log( add1  + add2 +" (Addition)");
    var y = 35;
    console.log( minus1 - minus2 +" (Subtraction)" ); 
    var y = 55;
    console.log( times1 * times2  +" (Multilplication)" ); 
    var y = 75;
    console.log( divide1 / divide2 +" (Division with decimal)" ); 
    var y = 95;
    console.log( Math.floor (divide3 / divide4) + " R" + divide3 % divide4 +" (Division with remainder)"); 
    var y = 115;
    console.log( Math.pow(exponet2, exponet1) + " (Exponent) ");
    
    
    • // The operation with the number "1" goes first
    • var add1 = 0
    • var add2 = 0
    • var add1 = 0;
    • var add2 = 0;
    • var minus1 = 0
    • var minus2 = 0
    • var minus1 = 0;
    • var minus2 = 0;
    • var divide1 = 0
    • var divide2 = 0
    • var times1 = 0;
    • var times2 = 0;
    • var times1 = 0
    • var times2 = 0
    • //change the numbers in the varibles above
    • var exponet1 = 0;
    • var exponet2 = 0;
    • var divide1 = 0; //Division with decimal
    • var divide2 = 0;
    • var divide3 = 0; //Division with remainder
    • var divide4 = 0;
    • var y = 15;
    • console.log( add1 + add2 +" (Addition)");
    • var y = 35;
    • console.log( minus1 - minus2 +" (Subtraction)" );
    • var y = 55;
    • console.log( times1 * times2 +" (Multilplication)" );
    • var y = 75;
    • console.log( divide1 / divide2 +" (Division with decimal)" );
    • var y = 95;
    • console.log( Math.floor (divide3 / divide4) + " R" + divide3 % divide4 +" (Division with remainder)");
    • var y = 115;
    • console.log( Math.pow(exponet2, exponet1) + " (Exponent) ");
    • console.log("Addition" , add1 + add2) //Addition
    • console.log("Subtraction", minus1-minus2) //Subtraction
    • console.log("Division" , divide1/divide2) //Division
    • console.log("Multiplication" , times1*times2) //Multiplication
// The operation with the number "1" goes first
var add1 = 0
var add2 = 0

var minus1 = 0
var minus2 = 0

var divide1 = 0
var divide2 = 0

var times1 = 0
var times2 = 0
//change the numbers in the varibles above

console.log("Addition" , add1 + add2) //Addition

console.log("Subtraction", minus1-minus2) //Subtraction

console.log("Division" , divide1/divide2) //Division

console.log("Multiplication" , times1*times2) //Multiplication