From 1e4904a00df55948faf1cbc0d5a46fe4ab595504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Wed, 3 Nov 2021 13:29:24 +0100 Subject: [PATCH] Update README.md --- subjects/diamon/README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/subjects/diamon/README.md b/subjects/diamon/README.md index c6e91668..92bb660f 100644 --- a/subjects/diamon/README.md +++ b/subjects/diamon/README.md @@ -1,3 +1,33 @@ ## 🌟 Diamon -diamon (pyramid + reversed pyramid) +### Instructions + +Create a `diamon` function that takes a string and a number as parameters +and return a diamon shape constructed by 2 arguments: + - the characters (as a string) to be repeated + - the size of a side (as a number) + +Just like pyramid + a reversed pyramid + +### 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)