|
|
@ -2,11 +2,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
Create a `pyramid` function that takes a string and a number as parameters |
|
|
|
Create a function named `pyramid` which works just like your `triangle` function. But, it should be pyramid shaped. |
|
|
|
and return a pyramid constructed by the string passed as argument and with the depth |
|
|
|
|
|
|
|
of the number passed as argument. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Just like triangle |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Output example |
|
|
|
### Output example |
|
|
|
|
|
|
|
|
|
|
@ -24,5 +20,5 @@ Just like triangle |
|
|
|
|
|
|
|
|
|
|
|
### Notions |
|
|
|
### Notions |
|
|
|
|
|
|
|
|
|
|
|
- [nan-academy.github.io/js-training/examples/loops](https://nan-academy.github.io/js-training/examples/loops.js) |
|
|
|
- [Loops](https://nan-academy.github.io/js-training/examples/loops.js) |
|
|
|
- [nan-academy.github.io/js-training/examples/recursion](https://nan-academy.github.io/js-training/examples/recursion.js) |
|
|
|
- [Recursion](https://nan-academy.github.io/js-training/examples/recursion.js) |
|
|
|