Skip to main content
Commonmark migration
Source Link

#JavaScript (ES8), 43 41 39 bytes

JavaScript (ES8), 43 41 39 bytes

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

##Test it

Test it

The output of the generated function is a string of spaces which are replaced with *s in this Snippet.

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

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>

#JavaScript (ES8), 43 41 39 bytes

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

##Test it

The output of the generated function is a string of spaces which are replaced with *s in this Snippet.

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

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>

JavaScript (ES8), 43 41 39 bytes

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

Test it

The output of the generated function is a string of spaces which are replaced with *s in this Snippet.

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

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>

added 69 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#JavaScript (ES8), 43 4141 39 bytes

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

##Test it

The output of the generated function is a string of spaces which are replaced with *s in this Snippet.

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

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>

#JavaScript (ES8), 43 41 bytes

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

##Test it

The output of the generated function is a string of spaces.

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

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>

#JavaScript (ES8), 43 41 39 bytes

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

##Test it

The output of the generated function is a string of spaces which are replaced with *s in this Snippet.

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

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>

Rollback to Revision 2
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#JavaScript (ES8), 43 41 39 2641 bytes

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

##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=>`_=>""n=>`f=_=>"".padEnd(${n}*19*("  "+f).length)`

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

#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>

#JavaScript (ES8), 43 41 bytes

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

##Test it

The output of the generated function is a string of spaces.

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

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>

added 93 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading
added 99 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94
Loading