Skip to content

Commit 6d51279

Browse files
authored
200%
1 parent 688b0a9 commit 6d51279

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ importance: 4
22

33
---
44

5-
# Function pow(x,n)
5+
# Funkcija 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+
Sukurkite funkciją `pow(x,n)`, kuri grąžina `x` iki `n` laipsnio. Kitaip tariant, padaugina `x` iš savęs `n` kartų ir grąžina rezultatą.
88

99
```js
1010
pow(3, 2) = 3 * 3 = 9
1111
pow(3, 3) = 3 * 3 * 3 = 27
1212
pow(1, 100) = 1 * 1 * ...* 1 = 1
1313
```
1414

15-
Create a web-page that prompts for `x` and `n`, and then shows the result of `pow(x,n)`.
15+
Sukurkite svetainę, kuri pateikia užklausas `x` ir `n` ir išveda rezultatą `pow(x,n)`.
1616

1717
[demo]
1818

19-
P.S. In this task the function should support only natural values of `n`: integers up from `1`.
19+
P.S. Šioje užduotyje reikalaujama, kad funkcija palaikytų tik natūraliąsias `n` vertės, t. y. sveikuosius skaičius nuo `1`.

0 commit comments

Comments
 (0)