I have an array of strings. I want to trim each string in the array.
I thought using [].map() with \'\'.trim() would work...
[\' a\', \' b \', \'c
With ES6 syntax it can be as easy as this:
[' hello ', ' world'].map(str => str.trim());