Horje
4.7.2. Compound Assignment Operators¶ Code Example
4.7.2. Compound Assignment Operators¶
/*A common programming task is to update the value of a variable in
reference to itself.*/

let x = 1;
x = x + 1;

console.log(x);

//2
4.7.2. Compound Assignment Operators¶
/*This action is so common, in fact, that it has a shorthand operator,
+=. The following example has the same behavior as the one above.*/

let x = 1;
x += 1;

console.log(x);

//2




Javascript

Related
if property is same group javscript Code Example if property is same group javscript Code Example
keyboard is underlined in eclipse javascript Code Example keyboard is underlined in eclipse javascript Code Example
detect form input changes javascript Code Example detect form input changes javascript Code Example
random color generator Code Example random color generator Code Example
javascript get today's hours in 24 hour format Code Example javascript get today's hours in 24 hour format Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8