File tree 3 files changed +1
-4
lines changed
1-js/02-first-steps/14-function-basics
3 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ importance: 1
4
4
5
5
# تابع min(a, b)
6
6
7
- Write a function ` min(a,b) ` which returns the least of two numbers ` a ` and ` b ` .
8
7
تابع ` min(a,b) ` را بنویسید که کمترین را از دو عدد ` a ` و ` b ` خروجی میدهد.
9
8
10
9
برای نمونه:
Original file line number Diff line number Diff line change @@ -12,10 +12,8 @@ pow(3, 3) = 3 * 3 * 3 = 27
12
12
pow (1 , 100 ) = 1 * 1 * ... * 1 = 1
13
13
```
14
14
15
- Create a web-page that prompts for ` x ` and ` n ` , and then shows the result of ` pow(x,n) ` .
16
15
یک صفحه وب که دو مقدار ` x ` و ` n ` را میگیرد و جواب ` pow(x,n) ` را برمیگرداند را بسازید.
17
16
18
17
[ demo]
19
18
20
- P.S. In this task the function should support only natural values of ` n ` : integers up from ` 1 ` .
21
19
پینوشت: این سوال فقط اعداد طبیعی را پشتیبانی میکند.
Original file line number Diff line number Diff line change @@ -342,8 +342,8 @@ return*!*;*/!*
342
342
این یک روش معمول است که تابع را با پیشوند فعلی شروع کنیم که کارش را به گنگی توصیف کند. یک توافقی در تیم باید بر معنیهای این پیشوندها باشد.
343
343
344
344
برای نمونه، توابعی که با ` " show" ` شروع میشوند، معمولی چیزی را نمایش میدهند.
345
- Function starting with...
346
345
توابعی که با اینها شروع میشوند...
346
+
347
347
- ` " get…" ` -- یک مقداری را بازمیگرداند،
348
348
- ` " calc…" ` -- چیزی را محاسبه میکند،
349
349
- ` " create…" ` -- چیزی را میسازد،
You can’t perform that action at this time.
0 commit comments