Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Latest commit

 

History

History

010-pyramid

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Two Sided Steps - Pyramids

Directions

Write a function that accepts a positive number N. The function should console log a pyramid shape with N levels using the # character. Make sure the pyramid has spaces on both the left and right hand sides

Examples

> pyramid(1)
'#'
> pyramid(2)
' # '
'###'
> pyramid(3)
'  #  '
' ### '
'#####'