Added solution to remove-whitespace-from-start-and-end.english.md (#35145)

* Update remove-whitespace-from-start-and-end.english.md

* includes whole solution now
This commit is contained in:
Kirill Malev 2019-02-12 20:34:52 +03:00 committed by Randell Dawson
parent 3e4bcf00b5
commit 661d10412f

View File

@ -52,6 +52,8 @@ let result = hello; // Change this line
<section id='solution'>
```js
// solution required
let hello = " Hello, World! ";
let wsRegex = /^(\s+)(.+[^\s])(\s+)$/;
let result = hello.replace(wsRegex, '$2');
```
</section>