chaining Array.prototype methods to String.prototype methods