Challenge
Write a function that will draw a pyramid. The function should take one integer parameter that will describe how many lines tall the pyramid should be.
This challenge is simple, but requires a bit of reflection to get it right. Here is an example in Node.js hosted on Repl.it.
Good luck!
This challenge comes from @aminnairi here on DEV! Want to propose a challenge idea for a future post? Email yo+challenge@dev.to with your suggestions!

Latest comments (20)
Python
My solution in js
[gist.github.com/devparkk/9b0e19758...]
My try. I used
padStartandpadEnd, and abused default parameters a bit, just for fun.Rust:
Javascript, can be run from the command line:
F#: