Skip to content

Commit 421d0f3

Browse files
committed
translated task & solution 4
1 parent 94ae99e commit 421d0f3

File tree

1 file changed

+4
-2
lines changed
  • 1-js/02-first-steps/14-function-basics/4-pow

1 file changed

+4
-2
lines changed

1-js/02-first-steps/14-function-basics/4-pow/task.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 4
22

33
---
44

5-
# Function pow(x,n)
5+
# تابع pow(x,n)
66

7-
Write a function `pow(x,n)` that returns `x` in power `n`. Or, in other words, multiplies `x` by itself `n` times and returns the result.
7+
تابع `pow(x,n)` را بنویسید که `x` به توان `n` را برمی‌گرداند.
88

99
```js
1010
pow(3, 2) = 3 * 3 = 9
@@ -13,7 +13,9 @@ pow(1, 100) = 1 * 1 * ...* 1 = 1
1313
```
1414

1515
Create a web-page that prompts for `x` and `n`, and then shows the result of `pow(x,n)`.
16+
یک صفحه وب که دو مقدار `x` و `n` را می‌گیرد و جواب `pow(x,n)` را بر‌می‌گرداند را بسازید.
1617

1718
[demo]
1819

1920
P.S. In this task the function should support only natural values of `n`: integers up from `1`.
21+
پی‌نوشت: این سوال فقط اعداد طبیعی را پشتیبانی می‌کند.

0 commit comments

Comments
 (0)