Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
Source by education.launchcode.org #
 
PREVIOUS NEXT
Tagged: #Compound #Assignment
ADD COMMENT
Topic
Name
6+7 =