0
Q:

javascript Arithmetic operators

answer_Add = 5 + 1; //answer = 6
answer_Sub = 5 - 1; //answer = 4
answer_Multi = 5 * 5; //answer = 25
answer_Divi = 10 / 2; //answer = 5
Total = answer_Add + answer_Sub + answer_Multi + answer_Divi;
1
var additionOutput = 2 + 2; //addition
var subtractionOutput = 2 - 2; //subtraction
var multiplcationOutput = 2 * 2; //multiplcation
var divisionOutput = 2 / 2; //division
1
x = a % b // % is modulo
0
console.log(10%3);
//returns 1 (the remainder of 10/3)
0
var additionOutput = 2 + 2; //addition
var subtractionOutput = 2 - 2; //subtraction
var multiplcationOutput = 2 * 2; //multiplcation
var divisionOutput = 2 / 2; //division
var exponentiation = 2**2; // Exponentiation
var modulus = 5 % 2; // Modulus (Remainder)
var unaryOperator = 1; 
++unaryOperator; // Unary Operator Increment // ++ , --
0
const adrian = {
  fullName: 'Adrian Oprea',
  occupation: 'Software developer',
  age: 31,
  website: 'https://oprea.rocks'
};

const bill = {
  ...adrian,
  fullName: 'Bill Gates',
  website: 'https://microsoft.com'
};
-2

New to Communities?

Join the community