mirror of https://github.com/01-edu/public.git
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.
26 lines
586 B
26 lines
586 B
4 years ago
|
## Triangle
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Create a `triangle` function that takes a string and a number as parameters
|
||
|
and return a triangle constructed by the string passed as argument and with the depth
|
||
|
of the number passed as argument.
|
||
|
|
||
|
### Output example
|
||
|
|
||
|
- `*` character and depth of 5:
|
||
|
|
||
|
```
|
||
|
*
|
||
|
**
|
||
|
***
|
||
|
****
|
||
|
*****
|
||
|
```
|
||
|
> No new line in last line
|
||
|
|
||
|
### Notions
|
||
|
|
||
|
- [nan-academy.github.io/js-training/examples/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)
|