Browse Source

docs(suffix): Adding the subject of exercice suffix for js piscine

CON-2229-MARKDOWN-create-suffix-subject
zainabdnaya 1 year ago
parent
commit
f90cc6638e
  1. 30
      subjects/suffix/README.md

30
subjects/suffix/README.md

@ -0,0 +1,30 @@
## suffix
### Instructions
Create function to move the first letter of each word to the end and add "er" to the end of each word while leaving punctuation marks untouched using regular expression
### Expected function
```js
function suffix(str) {
}
```
### Usage
Here is a possible program to test your function:
```js
const inputStr = " this is a test string ";
const format = suffix(inputStr);
console.log(format);
```
and the output should be:
```console
$ node index.js
"elloHer, orldwer! hisTwer is Her a estwer."
$
```
Loading…
Cancel
Save