File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
1-js/02-first-steps/07-operators Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ let a = ++counter; // (*)
281281alert(a); // *!*2*/!*
282282```
283283
284- Here in the line `(*)` the prefix call `++counter` increments `i ` and returns the new value that is `2`. So the `alert` shows `2`.
284+ Here in the line `(*)` the prefix call `++counter` increments `counter ` and returns the new value that is `2`. So the `alert` shows `2`.
285285
286286Now let' s use the postfix form:
287287
@@ -292,7 +292,7 @@ let a = counter++; // (*) changed ++counter to counter++
292292alert(a); // *!*1*/!*
293293` ` `
294294
295- In the line ` (*)` the * postfix* form ` counter++` also increments ` i ` , but returns the * old* value (prior to increment). So the ` alert` shows ` 1` .
295+ In the line ` (*)` the * postfix* form ` counter++` also increments ` counter ` , but returns the * old* value (prior to increment). So the ` alert` shows ` 1` .
296296
297297To summarize:
298298
You can’t perform that action at this time.
0 commit comments