Skip to main content
3 of 6
added 93 characters in body
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#JavaScript (ES8), 43 41 39 26 bytes

n=>`_=>"".padEnd(${n}*19)`

##Test it

The output of the generated function is a string of spaces, which have been replaced in the Snippet with *s so they can be seen.

g=
n=>`_=>"".padEnd(${n}*19)`

o.innerText=(h=n=>`Function: ${x=g(n)}\nLength:   ${x.length}\nOutput:   ${x=eval(x)().replace(/./g,"*")}\nLength:   `+x.length)(i.value=10);oninput=_=>o.innerText=h(+i.value)
<input id=i type=number><pre id=o>

Shaggy
  • 43.5k
  • 4
  • 36
  • 94