Skip to content

Commit dd28d58

Browse files
committed
Problem #38: added
1 parent 4e03d0c commit dd28d58

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

Problem.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
#35: Create a function that finds the maximum range of a triangle's third edge, where the side lengths are all integers.
3636
#36: Write a function that takes the base and height of a triangle and return its area.
3737
#37: Create a function that takes a number as an argument, increments the number by +1 and returns the result.
38+
#38: Create a function that takes a base number and an exponent number and returns the calculation.
39+
40+
41+
3842

3943
#24: Reverse a string
4044
#25: Create a function that will merge two arrays and return the result as a new array

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,3 +502,11 @@ const triangleArea = (base, height) => (base * height) / 2;
502502
const incrementsNumber = (n) => ++n;
503503
504504
```
505+
506+
**#38: Create a function that takes a base number and an exponent number and returns the calculation.**
507+
508+
```
509+
510+
const calculateExponent = (num, exp) => Math.pow(num, exp);
511+
512+
```

script.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,6 @@ const triangleArea = (base, height) => (base * height) / 2;
306306

307307
// #37: Create a function that takes a number as an argument, increments the number by +1 and returns the result.
308308
const incrementsNumber = (n) => ++n;
309+
310+
// #38: Create a function that takes a base number and an exponent number and returns the calculation.
311+
const calculateExponent = (num, exp) => Math.pow(num, exp);

0 commit comments

Comments
 (0)