You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
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)
' # '
' ### '
'#####'
The text was updated successfully, but these errors were encountered:
Description
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
'#'
' # '
'###'
' # '
' ### '
'#####'
The text was updated successfully, but these errors were encountered: