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:


Declarations and assignments:
* Syntax
* Mathematic operations and assignment

Table Of Contents
5 Declarations and assignments
11 Arrays
12 Objects
14 Classes
16 Map
17 Set
24 Loops
27 Date
29 Scope
30 AJAX
35 Cookies
41 JSON
44 Fetch
45 Modules
46 Screen
64 Console
68 Symbols
73 Modals
76 Events
86 Proxy
89 WeakMap
90 WeakSet
102 Tilde