You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
630 B

## Pyramid
5 years ago
### Instructions
Create a `pyramid` function that takes a string and a number as parameters
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
- `*` character and depth of 5 :
5 years ago
```
5 years ago
*
***
*****
*******
*********
```
> No new line in last line
5 years ago
### Notions
- [nan-academy.github.io/js-training/examples/loops.js](https://nan-academy.github.io/js-training/examples/loops.js)
- [nan-academy.github.io/js-training/examples/recursion.js](https://nan-academy.github.io/js-training/examples/recursion.js)