# JavaScript (ES6), <s>142</s> <s>140</s> <s>134</s> 117 bytes n=>(g=x=>x?`${t=` `[r=`repeat`](n-x--)}\\${s=` `[r](x)}|${s}/${t} `+g(x):`-`[r](n))(n)+`O`+[...g(n)].reverse().join`` --- ## Try It <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> f= n=>(g=x=>x?`${t=` `[r=`repeat`](n-x--)}\\${s=` `[r](x)}|${s}/${t} `+g(x):`-`[r](n))(n)+`O`+[...g(n)].reverse().join`` i.addEventListener("input",_=>o.innerText=f(+i.value)) o.innerText=f(i.value=1) <!-- language: lang-html --> <input id=i type=number><pre id=o> <!-- end snippet -->