Mathematic operations and assignment

suggest change

Increment by

var a = 9,  
b = 3;  
b += a;

b will now be 12

This is functionally the same as

b = b + a;

Decrement by

var a = 9,  
b = 3;  
b -= a;

b will now be 6

This is functionally the same as

b = b - a;

Multiply by

var a = 5,  
b = 3;  
b *= a;

b will now be 15

This is functionally the same as

b = b * a;

Divide by

var a = 3,  
b = 15;  
b /= a;

b will now be 5

This is functionally the same as

b = b / a;

Raised to the power of

var a = 3,  
b = 15;  
b **= a;

b will now be 3375

This is functionally the same as

b = b ** a;

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents