Want to trim each string in an array, e.g., given
x = [\' aa \', \' bb \'];
output
[\'aa\', \'bb\']
My fi
If you are using JQuery, then a better way to do this, as it will work with IE8 as well (I need to support IE8) is this:
$.map([' aa ', ' bb ', ' cc '], $.trim);