Skip to content

Commit da62c2b

Browse files
committed
Add "%" operator to assignment operators shorthand list
The "%" modulus operator is also available for the shorthand notation
1 parent da3b43f commit da62c2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

1-js/2-first-steps/8-operators/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ n *= 2; // теперь n=14 (работает как n = n * 2)
382382
alert( n ); // 14
383383
```
384384

385-
Так можно сделать для операторов `+,-,*,/` и бинарных `<<,>>,>>>,&,|,^`.
385+
Так можно сделать для операторов `+,-,*,/,%` и бинарных `<<,>>,>>>,&,|,^`.
386386

387387
Вызов с присваиванием имеет в точности такой же приоритет, как обычное присваивание, то есть выполнится после большинства других операций:
388388

0 commit comments

Comments
 (0)