Building Spikes Codegolf
f =n=>` ^
/|\\/.|.\\
/..|..\\
___`.replace(/.[_|^]./g,'$&'.repeat(n))+'____'
// test it outdocument.body.innerHTML +=
`<pre>${f(1)}
${f(3)}
${f(4)}`
Great codegolf stackexchange answer from user tsh
f = n=>` ^
/|\\/.|.\\
/..|..\\
___`.replace(/.[_|^]./g,'$&'.repeat(n))+'____'
// test it outdocument.body.innerHTML +=
`<pre>${f(1)}
${f(3)}
${f(4)}`
Great codegolf stackexchange answer from user tsh