Over a million developers have joined DZone.

Javascript Trim

·
Adds trim function to javascript string object.

String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}