Core Docs | Additional Modules Docs

String.prototype.trim


@Description: trims whitespace from both left and right side of a string
@File: String/prototype/trim.js
@Return: String The original string with whitespace removed from left and right side
@Example:
var str = '    hello world       ';

var newString = str.trim();
//newString = 'hello world'