---
title: "Discussion on \"How I solved the pyramid algorithm in JavaScript\" | Hashnode"
description: "Discussion on \"How I solved the pyramid algorithm in JavaScript\". Instructions\nWrite 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\n// Examples\npyramid(1)\n//     ..."
url: "https://hashnode.com/posts/how-i-solved-the-pyramid-algorithm-in-javascript/615c4e6e7db4a563964ab976"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How I solved the pyramid algorithm in JavaScript](https://delvoid.hashnode.dev/how-i-solved-the-pyramid-algorithm-in-javascript?utm_source=hashnode&utm_medium=feed)

Instructions 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) // ...

Oct 5, 2021 · 3 min read · delvoid.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#algorithm](https://hashnode.com/tag/algorithm)
-   [#learning](https://hashnode.com/tag/learning)
-   [#learning-journey](https://hashnode.com/tag/learning-journey)

## Written by

[Dave Hough](https://hashnode.com/@Delvoid)

@Delvoid · United Kingdom

  
[View profile](https://hashnode.com/@Delvoid)

Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
