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:
parent
3e4bcf00b5
commit
661d10412f
@ -52,6 +52,8 @@ let result = hello; // Change this line
|
|||||||
<section id='solution'>
|
<section id='solution'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// solution required
|
let hello = " Hello, World! ";
|
||||||
|
let wsRegex = /^(\s+)(.+[^\s])(\s+)$/;
|
||||||
|
let result = hello.replace(wsRegex, '$2');
|
||||||
```
|
```
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user