Here you can find the source of lpad(padString, length)
// Pad the left side of a string with a given character String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) str = padString + str;//w w w . j a va2 s . c om return str; };
function fill(num) { return (num == 10 ? '' : '0') + num; String.prototype.lpad = function(pad, length) { var s = this; while (s.length < length) { s = pad + s; return s; ...
String.prototype.lpad = function(padLength, padString){ var s = this; while(s.length < padLength) s = padString + s; return s;
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) str = padString + str; return str;
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) str = padString + str; return str;
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) str = padString + str; return str;
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length) { str = padString + str; return str; };
String.prototype.lpad = function(padString, length) { var str = this; while(str.length < length) str = padString + str; return str;
"use strict"; String.prototype.lpad = function(padString, length) { let str = this; while (str.length < length) str = padString + str; return str; };
String.prototype.lpad = function(padString, length) { var str = this; while (str.length < length){ str = padString + str; return str;