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.

34 lines
703 B

## 🌟 Diamon
3 years ago
### Instructions
Create a `diamon` function that takes a string and a number as parameters
3 years ago
and returns a diamond shape constructed by 2 arguments:
3 years ago
- the characters (as a string) to be repeated
- the size of a side (as a number)
3 years ago
It is just like pyramid + a reversed pyramid
3 years ago
### Output example
- `*` character and side 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)