From 876db1c8f19c9525770dcff8b74e57469d8997e7 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 12 Oct 2023 08:36:50 -0400 Subject: [PATCH] docs(vowelSing): Adding the subject of exercice vowelSign for js piscine --- subjects/vowelSign/README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 subjects/vowelSign/README.md diff --git a/subjects/vowelSign/README.md b/subjects/vowelSign/README.md new file mode 100644 index 000000000..dbd1d84a4 --- /dev/null +++ b/subjects/vowelSign/README.md @@ -0,0 +1,35 @@ +## vowelSign + +### Instructions + +Create function named "VowelSign" that takes a string as its input parameter. + +The function is expected to produce a modified string as its output, where in each uppercase vowel in the input string is replaced with a "+" symbol, and each lowercase vowel is substituted with a "-" symbol. + +It is required to implement this functionality by defining a regular expression pattern for identifying vowels, which should be stored in a variable named "vowels." + +### Expected function + +```js +function VowelSign(inputString) { +} + +``` +### Usage + +Here is a possible program to test your function + +```js + +const inputStr = "This Is a Sample StrIng"; +const result = VowelSign(inputStr); +console.log(result); + +``` +And its output : + +```console +$ node index.js +"Th-s +s a S-mpl- Str+ng + +``` \ No newline at end of file