mirror of https://github.com/01-edu/public.git
zainabdnaya
1 year ago
1 changed files with 30 additions and 0 deletions
@ -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…
Reference in new issue