Assignment Operators in JavaScript

 JavaScript Assignment Operator

There are many assignment operators in javascript.

1)     =
2)     +=
3)     -=
4)     *=
5)     /=
6)     %=
7)     **=


let a = 4;
let b = 2;
a += b;
document.write(a);
a -= b;
document.write(a);
a *= b;
document.write(a);
a /= b;
document.write(a);
a %= b;
document.write(a);
a **= b;
document.write(a);

See more details please watch my video Click Here

Post a Comment

Previous Post Next Post