JSFiddle - React, Tailwind, and code Playground

JavaScript

[' a', ' b   ', 'c'].map(String.prototype.trim);