Node.js examples for String:Length
Set String length
Array.prototype.setLength = function(len, val) { val = typeof val != "undefined" ? val : null; for (var i = 0; i < len; i++) { this[i] = val;/*from w w w.j a va 2 s . c om*/ } return this; }