Skip to content

Commit 890996b

Browse files
committed
merging all conflicts
2 parents fd692b8 + 746ad80 commit 890996b

4 files changed

Lines changed: 39 additions & 0 deletions

File tree

1-js/02-first-steps/04-variables/article.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,21 @@ let message = "آن"; // SyntaxError: Identifier 'message' has already been decl
150150
بنابراین، ما باید متغیر را یک بار تعریف کنیم و سپس بدون `let` به آن رجوع کنیم.
151151
````
152152

153+
<<<<<<< HEAD
153154
```smart header="زبان‌های Functional"
154155
جالب است بدانید زبان‌های [functional](https://fa.wikipedia.org/wiki/برنامه%E2%80%8Cنویسی_تابعی) (تابع‌محور) مانند [Scala](http://www.scala-lang.org/) یا [Erlang](http://www.erlang.org/) وجود دارند که تغییر مقدار متغیر را ممنوع کرده‌اند.
156+
=======
157+
```smart header="Functional languages"
158+
It's interesting to note that there exist so-called [pure functional](https://en.wikipedia.org/wiki/Purely_functional_programming) programming languages, such as [Haskell](https://en.wikipedia.org/wiki/Haskell), that forbid changing variable values.
159+
>>>>>>> 746ad803c878e33182e7fab1578c0d15b9b75ca0
155160
156161
در این نوع زبان‌ها، یک بار که مقداری را "در جعبه" قرار می‌دهیم، تا ابد آنجا می‌ماند. اگر بخواهیم مقداری دیگر را ذخیره کنیم، زبان ما را مجبور می‌کند تا جعبه‌ای جدید بسازیم (متغیر جدیدی تعریف کنیم). نمی‌توانیم از متغیر قدیمی استفاده کنیم.
157162
163+
<<<<<<< HEAD
158164
اگرچه در نگاه اول این زبان‌ها عجیب به نظر می‌رسند، ولی کاملا توانایی توسعه پروژه‌های جدی را دارند. مهم‌تر از آن، در زمینه‌هایی مانند محاسبات موازی (Parallel Computation) این محدودیت‌ها تبدیل به مزیت می‌شوند. مطالعه‌ی چنین زبان‌هایی (حتی اگر به این زودی قصد استفاده از آنها را ندارید) برای وسیع شدن دیدتان، توصیه می‌شود.
165+
=======
166+
Though it may seem a little odd at first sight, these languages are quite capable of serious development. More than that, there are areas like parallel computations where this limitation confers certain benefits.
167+
>>>>>>> 746ad803c878e33182e7fab1578c0d15b9b75ca0
159168
```
160169

161170
## نام‌گذاری متغیرها [#variable-naming]

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,15 @@
5050
برای مثال:
5151

5252
```js run
53+
<<<<<<< HEAD
5354
alert( 5 % 2 ); // 1، باقی‌ماندهٔ تقسیم 5 بر 2
5455
alert( 8 % 3 ); // 2، باقی‌ماندهٔ تقسیم 8 بر 3
5556
alert( 8 % 4 ); // باقی‌ماندۀ تقسیم 8 بر 4، 0
57+
=======
58+
alert( 5 % 2 ); // 1, the remainder of 5 divided by 2
59+
alert( 8 % 3 ); // 2, the remainder of 8 divided by 3
60+
alert( 8 % 4 ); // 0, the remainder of 8 divided by 4
61+
>>>>>>> 746ad803c878e33182e7fab1578c0d15b9b75ca0
5662
```
5763

5864
### بتوان‌رساندن **

1-js/05-data-types/07-map-set/article.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,23 @@
1414

1515
متدها و ویژگی‌های آن:
1616

17+
<<<<<<< HEAD
1718
- [`new Map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/Map) -- map را می‌سازد.
1819
- [`map.set(key, value)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set) -- value را به واسطه key ذخیره می‌کند.
1920
- [`map.get(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) -- مقدار را به واسطه key برمی‌گرداند، اگر `key` در map وجود نداشته باشد `undefined` برگردانده می‌شود.
2021
- [`map.has(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) -- اگر `key` وجود داشته باشد `true` برگردانده می‌شود، در غیر این صورت `false`.
2122
- [`map.delete(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete) -- مقدار را به واسطه key حذف می‌کند.
2223
- [`map.clear()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear) -- همه چیز را از map حذف می‌کند.
2324
- [`map.size`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size) -- تعداد المان‌های کنونی را برمی‌گرداند.
25+
=======
26+
- [`new Map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/Map) -- creates the map.
27+
- [`map.set(key, value)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set) -- stores the value by the key.
28+
- [`map.get(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) -- returns the value by the key, `undefined` if `key` doesn't exist in map.
29+
- [`map.has(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) -- returns `true` if the `key` exists, `false` otherwise.
30+
- [`map.delete(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete) -- removes the element (the key/value pair) by the key.
31+
- [`map.clear()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear) -- removes everything from the map.
32+
- [`map.size`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size) -- returns the current element count.
33+
>>>>>>> 746ad803c878e33182e7fab1578c0d15b9b75ca0
2434
2535
برای مثال:
2636

@@ -304,13 +314,23 @@ set.forEach((value, valueAgain, set) => {
304314
305315
متدها و ویژگی‌های آن:
306316
317+
<<<<<<< HEAD
307318
- [`new Map([iterable])`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/Map) -- map را می‌سازد، برای مقداردهی اولیه از `iterable`(حلقه‌پذیر) اختیاری (مانند آرایه) از جفت‌های `[key,value]` می‌توان استفاده کرد.
308319
- [`map.set(key, value)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set) -- مقدار را به واسطه کلید ذخیره می‌کند، خود map را برمی‌گرداند.
309320
- [`map.get(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) -- مقدار را به واسطه کلید برمی‌گرداند، اگر `key` در map وجود نداشته باشد `undefined` برمی‌گرداند.
310321
- [`map.has(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) -- اگر `key` وجود داشته باشد `true` برمی‌گرداند، در غیر این صورت `false`.
311322
- [`map.delete(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete) -- مقدار را به واسطه کلید حذف می‌کند، اگر `key` در لحظه فراخوانی وجود داشته باشد `true` برمی‌گرداند، در غیر این صورت `false`.
312323
- [`map.clear()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear) -- همه چیز را از map حذف می‌کند.
313324
- [`map.size`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size) -- تعداد المان‌ها را برمی‌گرداند.
325+
=======
326+
- [`new Map([iterable])`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/Map) -- creates the map, with optional `iterable` (e.g. array) of `[key,value]` pairs for initialization.
327+
- [`map.set(key, value)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set) -- stores the value by the key, returns the map itself.
328+
- [`map.get(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) -- returns the value by the key, `undefined` if `key` doesn't exist in map.
329+
- [`map.has(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) -- returns `true` if the `key` exists, `false` otherwise.
330+
- [`map.delete(key)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete) -- removes the element by the key, returns `true` if `key` existed at the moment of the call, otherwise `false`.
331+
- [`map.clear()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear) -- removes everything from the map.
332+
- [`map.size`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size) -- returns the current element count.
333+
>>>>>>> 746ad803c878e33182e7fab1578c0d15b9b75ca0
314334
315335
تفاوت آن با `Object` معمولی:
316336

1-js/06-advanced-functions/08-settimeout-setinterval/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ let timerId = setTimeout(func|code, [delay], [arg1], [arg2], ...)
2727
: میزان تاخیر قبل از اجرا، به میلی‌ثانیه (1000 میلی‌ثانیه = 1 ثانیه)، به طور پیش‌فرض 0 است.
2828

2929
`arg1`, `arg2`...
30+
<<<<<<< HEAD
3031
: آرگومان‌های تابع (در IE9- پشتیبانی نمی‌شود)
32+
=======
33+
: Arguments for the function
34+
>>>>>>> 746ad803c878e33182e7fab1578c0d15b9b75ca0
3135
3236
برای مثال، این کد `sayHi()` را بعد از یک ثانیه فرا می‌خواند:
3337

0 commit comments

Comments
 (0)