JavaScript Assignment Operators
Assignment Operators
1] Assignment (=)
2] Addition Assignment (+ = )
3] Subtraction Assignment (- =)
4] Multiplication Assignment (* =)
5] Division Assignment (/ =)
6] Remainder Assignment (% =)
1] Assignment (=)
Example :-
let a = 10;console.log(a);
Output :-
let a = 10;
console.log(a);
2] Addition Assignment (+ = )
Example :-
let a = 10;
a +=5;
console.log(a);
Output :-
3] Subtraction Assignment (- =)
Example :-
let a = 10;a -=5;console.log(a); Output :-
let a = 10;
a -=5;
console.log(a);
4] Multiplication Assignment (* =)
Example :-
let a = 10;a *=5;console.log(a); Output :-
let a = 10;
a *=5;
console.log(a);
5] Division Assignment (/ =)
Example :-
let a = 100;a /=5;console.log(a); Output :-
let a = 100;
a /=5;
console.log(a);
6] Remainder Assignment (% =)
Example :-
let a = 100;a %=5;console.log(a); Output :-
let a = 100;
a %=5;
console.log(a);
Post a Comment