code: function makeWhiteSpace(n) {
    var buffer = [], nb = true;
    for (; n > 0; n--) {
      buffer.push((nb || n == 1) ? nbsp : " ");
      nb = !nb;
    }
    return buffer.join("");
  }
docs: Make sure a string does not contain two consecutive 'collapseable' whitespace characters.