Skip to main content
1 of 6
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#JavaScript (ES8), 43 bytes

n=>`f=_=>"".padEnd(${n}*((""+f).length+2))`

##Test it

g=
n=>`f=_=>"".padEnd(${n}*((""+f).length+2))`

o.innerText=(h=n=>`Function: ${x=g(n)}\nLength:   ${x.length}\nOutput:   "${x=eval(x)()}"\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