Skip to content

Commit fa6014a

Browse files
committed
merging all conflicts
2 parents 2bd44e4 + 71da17e commit fa6014a

29 files changed

Lines changed: 101 additions & 38 deletions

File tree

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ alert( +apples + +oranges ); // 5
194194
| اولویت | نام | علامت |
195195
|------------|------|------|
196196
| ... | ... | ... |
197+
<<<<<<< HEAD
197198
| 17 | جمع یگانه | `+` |
198199
| 17 | تفریق یگانه | `-` |
199200
| 16 | بتوان رساندن | `**` |
@@ -206,10 +207,28 @@ alert( +apples + +oranges ); // 5
206207
| ... | ... | ... |
207208

208209
همانطور که می‌بینیم "عملگر + یگانه" اولویت 17 دارد که از عملگر جمع ( + دوگانه) با اولویت 13 بالاتر است. به همین دلیل است که در عبارت `"+apples + +oranges"` عملگرهای + یگانه پیش از علامت جمع اجرا می‌شوند.
210+
=======
211+
| 15 | unary plus | `+` |
212+
| 15 | unary negation | `-` |
213+
| 14 | exponentiation | `**` |
214+
| 13 | multiplication | `*` |
215+
| 13 | division | `/` |
216+
| 12 | addition | `+` |
217+
| 12 | subtraction | `-` |
218+
| ... | ... | ... |
219+
| 2 | assignment | `=` |
220+
| ... | ... | ... |
221+
222+
As we can see, the "unary plus" has a priority of `15` which is higher than the `13` of "addition" (binary plus). That's why, in the expression `"+apples + +oranges"`, unary pluses work before the addition.
223+
>>>>>>> 71da17e5960f1c76aad0d04d21f10bc65318d3f6
209224
210225
## مقداردهی
211226
227+
<<<<<<< HEAD
212228
در نظر داشته باشید که مقداردهی با علامت `=` نیز یک عملگر است. در جدول اولویت‌ها با اولویت پایین `3` قرار گرفته است.
229+
=======
230+
Let's note that an assignment `=` is also an operator. It is listed in the precedence table with the very low priority of `2`.
231+
>>>>>>> 71da17e5960f1c76aad0d04d21f10bc65318d3f6
213232

214233
به همین دلیل است که وقتی متغیری را مقدار دهی می‌کنیم، مانند `x = 2 * 2 + 1`، ابتدا عملیات محاسباتی انجام شده و سپس مقداردهی `=` صورت می‌گیرد و نتیجه را داخل `x` ذخیره می‌کند.
215234

1-js/04-object-basics/06-constructor-new/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# سازنده، عملگر "new"
22

3+
<<<<<<< HEAD
34
سینتکس معمولی {...} اجازه ساخت یک شیء را می دهد. اما غالبا ما نیاز داریم که شیء های متشابه زیادی ایجاد کنیم، مثل چند کاربر یا آیتم های منو و...
5+
=======
6+
The regular `{...}` syntax allows us to create one object. But often we need to create many similar objects, like multiple users or menu items and so on.
7+
>>>>>>> 71da17e5960f1c76aad0d04d21f10bc65318d3f6
48
59
این می تواند با استفاده از تابع های سازنده و عملگر `new` انجام شود.
610

1-js/05-data-types/10-destructuring-assignment/destructuring-complex.svg

Lines changed: 1 addition & 1 deletion
Loading

1-js/06-advanced-functions/01-recursion/recursive-salaries.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

1-js/07-object-properties/01-property-descriptors/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,11 @@ for (let key in user) {
318318

319319
...اما این روش پرچم‌ها را کپی نمی‌کند. پس اگر ما کپی‌برداری «بهتری» بخواهیم `Object.defineProperties` ترجیح داده می‌شود.
320320

321+
<<<<<<< HEAD
321322
تفاوتی دیگر این است که `for..in` ویژگی‌های سمبلی (symbolic) را نادیده می‌گیرد، اما `Object.getOwnPropertyDescriptors` *تمام* توصیف‌کننده‌های ویژگی‌ها را برمی‌گرداند که شامل ویژگی‌های سمبلی هم می‌شود.
323+
=======
324+
Another difference is that `for..in` ignores symbolic and non-enumerable properties, but `Object.getOwnPropertyDescriptors` returns *all* property descriptors including symbolic and non-enumerable ones.
325+
>>>>>>> 71da17e5960f1c76aad0d04d21f10bc65318d3f6
322326
323327
## مهر و موم کردن شیء به طور کلی
324328

1-js/11-async/01-callbacks/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,4 +269,8 @@ function step3(error, script) {
269269

270270
ما نیاز داریم تا روش بهتری برای اینکار پیدا کنیم.
271271

272+
<<<<<<< HEAD
272273
خوشبختانه راه هایی برای حل این مشکل وجود دارند که یکی از بهترین های آن "قول"ها(promises) هستند که در بخش بعدی به آنها میپردازیم.
274+
=======
275+
Luckily, there are other ways to avoid such pyramids. One of the best ways is to use "promises", described in the next chapter.
276+
>>>>>>> 71da17e5960f1c76aad0d04d21f10bc65318d3f6
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

1-js/11-async/08-async-await/01-rewrite-async/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function loadJson(url) { // (1)
1313
throw new Error(response.status);
1414
}
1515

16-
loadJson('no-such-user.json')
16+
loadJson('https://javascript.info/no-such-user.json')
1717
.catch(alert); // Error: 404 (4)
1818
```
1919

0 commit comments

Comments
 (0)