#JavaScript (ES6), <s>33</s> <s>28</s> 23 bytes <!-- language-all: lang-js --> (n,x=n)=>--x?n*f(n,x):n --- ##Try It <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> f= (n,x=n)=>--x?n*f(n,x):n o.innerText=f(i.value=3) i.oninput=_=>o.innerText=f(+i.value) <!-- language: lang-html --> <input id=i min=1 type=number><pre id=o> <!-- end snippet --> --- ##History ###28 bytes n=>eval(1+("*"+n).repeat(n)) ###33 bytes n=>eval(Array(n).fill(n).join`*`)