95. implement String.prototype.trim()

medium  - accepted / - tried

String.prototype.trim() is commonly used when processing strings.

It is very easy, can you implement your own one?

There are many ways to do it, can you think of different approaches?

Bugfree ordinary solution is better than buggy fancy ones.

(1)
(58)