You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
همانطور که میبینیم "عملگر + یگانه" اولویت 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
208
+
همانطور که میبینیم «عملگر + یگانه» اولویت `15` دارد که از عملگر جمع ( + دوگانه) با اولویت `13` بالاتر است. به همین دلیل است که در عبارت `"+apples + +oranges"` عملگرهای + یگانه پیش از علامت جمع اجرا میشوند.
224
209
225
210
## مقداردهی
226
211
227
-
<<<<<<< HEAD
228
-
در نظر داشته باشید که مقداردهی با علامت `=` نیز یک عملگر است. در جدول اولویتها با اولویت پایین `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
212
+
در نظر داشته باشید که مقداردهی با علامت `=` نیز یک عملگر است. در جدول اولویتها با اولویت پایین `2` قرار گرفته است.
232
213
233
214
به همین دلیل است که وقتی متغیری را مقدار دهی میکنیم، مانند `x = 2 * 2 + 1`، ابتدا عملیات محاسباتی انجام شده و سپس مقداردهی `=` صورت میگیرد و نتیجه را داخل `x` ذخیره میکند.
Copy file name to clipboardExpand all lines: 1-js/04-object-basics/06-constructor-new/article.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,6 @@
1
1
# سازنده، عملگر "new"
2
2
3
-
<<<<<<< HEAD
4
3
سینتکس معمولی {...} اجازه ساخت یک شیء را می دهد. اما غالبا ما نیاز داریم که شیء های متشابه زیادی ایجاد کنیم، مثل چند کاربر یا آیتم های منو و...
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
8
4
9
5
این می تواند با استفاده از تابع های سازنده و عملگر `new` انجام شود.
Copy file name to clipboardExpand all lines: 1-js/07-object-properties/01-property-descriptors/article.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -318,11 +318,7 @@ for (let key in user) {
318
318
319
319
...اما این روش پرچمها را کپی نمیکند. پس اگر ما کپیبرداری «بهتری» بخواهیم `Object.defineProperties` ترجیح داده میشود.
320
320
321
-
<<<<<<< HEAD
322
-
تفاوتی دیگر این است که `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
321
+
تفاوتی دیگر این است که `for..in` ویژگیهای سمبلی (symbolic) و ویژگیهای غیر قابل شمارش را نادیده میگیرد، اما `Object.getOwnPropertyDescriptors`*تمام* توصیفکنندههای ویژگیها را برمیگرداند که شامل ویژگیهای سمبلی و غیر قابل شمارش هم میشود.
0 commit comments