Skip to content

Commit 52ed864

Browse files
authored
Wrong variables name
1 parent 2d4e469 commit 52ed864

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1-js/02-first-steps/07-operators/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ let a = ++counter; // (*)
281281
alert(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
286286
Now let's use the postfix form:
287287

@@ -292,7 +292,7 @@ let a = counter++; // (*) changed ++counter to counter++
292292
alert(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

297297
To summarize:
298298

0 commit comments

Comments
 (0)