Skip to main content
added 18 characters in body
Source Link
user58826
user58826

JS (ES6), 88 7474 73 bytes

x=>(x--,y=y=>(" ".repeat(x)+"+\n"+`+
`).repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``)

Probably can be golfed more.

Snippetify(x=>(x--,y=y=>(" ".repeat(x)+"+\n"+`+
`).repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``))
<script src="https://programmer5000.com/snippetify.min.js"></script>
<input type = "number">
<pre data-output></pre>

JS (ES6), 88 74 bytes

x=>(x--,y=y=>(" ".repeat(x)+"+\n").repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``)

Probably can be golfed more.

Snippetify(x=>(x--,y=y=>(" ".repeat(x)+"+\n").repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``))
<script src="https://programmer5000.com/snippetify.min.js"></script>
<input type = "number">
<pre data-output></pre>

JS (ES6), 88 74 73 bytes

x=>(x--,y=y=>(" ".repeat(x)+`+
`).repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``)

Probably can be golfed more.

Snippetify(x=>(x--,y=y=>(" ".repeat(x)+`+
`).repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``))
<script src="https://programmer5000.com/snippetify.min.js"></script>
<input type = "number">
<pre data-output></pre>

Source Link
user58826
user58826

JS (ES6), 88 74 bytes

x=>(x--,y=y=>(" ".repeat(x)+"+\n").repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``)

Probably can be golfed more.

Snippetify(x=>(x--,y=y=>(" ".repeat(x)+"+\n").repeat(x),y``+"+".repeat(x+x+1)+"\n"+y``))
<script src="https://programmer5000.com/snippetify.min.js"></script>
<input type = "number">
<pre data-output></pre>