From 779aad7da94c08eb85de98d473930c8192b27837 Mon Sep 17 00:00:00 2001 From: Sergei Date: Tue, 25 Jan 2022 14:55:31 +0300 Subject: [PATCH 1/2] fixes operator precedence --- 1-js/02-first-steps/08-operators/article.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/1-js/02-first-steps/08-operators/article.md b/1-js/02-first-steps/08-operators/article.md index decf5bcf..4df14916 100644 --- a/1-js/02-first-steps/08-operators/article.md +++ b/1-js/02-first-steps/08-operators/article.md @@ -194,11 +194,11 @@ Here's an extract from the [precedence table](https://developer.mozilla.org/en-U | Precedence | Name | Sign | |------------|------|------| | ... | ... | ... | -| 17 | unary plus | `+` | -| 17 | unary negation | `-` | -| 16 | exponentiation | `**` | -| 15 | multiplication | `*` | -| 15 | division | `/` | +| 16 | unary plus | `+` | +| 16 | unary negation | `-` | +| 15 | exponentiation | `**` | +| 14 | multiplication | `*` | +| 14 | division | `/` | | 13 | addition | `+` | | 13 | subtraction | `-` | | ... | ... | ... | From 041bbb2560613ba4dd95f5f4802348061c4a0872 Mon Sep 17 00:00:00 2001 From: Sergei Fomin Date: Sat, 29 Jan 2022 01:03:47 +0300 Subject: [PATCH 2/2] Update article.md --- 1-js/02-first-steps/08-operators/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/08-operators/article.md b/1-js/02-first-steps/08-operators/article.md index 4df14916..54daa2fc 100644 --- a/1-js/02-first-steps/08-operators/article.md +++ b/1-js/02-first-steps/08-operators/article.md @@ -205,7 +205,7 @@ Here's an extract from the [precedence table](https://developer.mozilla.org/en-U | 3 | assignment | `=` | | ... | ... | ... | -As we can see, the "unary plus" has a priority of `17` which is higher than the `13` of "addition" (binary plus). That's why, in the expression `"+apples + +oranges"`, unary pluses work before the addition. +As we can see, the "unary plus" has a priority of `16` which is higher than the `13` of "addition" (binary plus). That's why, in the expression `"+apples + +oranges"`, unary pluses work before the addition. ## Assignment