code: function leftPad(n, prefix) {
    var s = n.toString(),
        nchars = intChars(n),
        nspaces = nchars - s.length - 1;
  
    prefix || (prefix = ' ');
  
    for (var i = 0; i < nspaces; i++) {
      prefix += ' ';
    }
  
    return prefix + s;
  }
docs: Adds spaces and prefix to number