Skip to content

quintin-dev/JavaScript-Mini_Projects-Pyramid_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Mini Project: Pyramid Pattern Generator

Description

This project is a JavaScript-based exercise that generates a pyramid pattern using a specified character. It demonstrates fundamental programming concepts, including loops, string manipulation, and dynamic row generation.

The pyramid can be customized with different characters, row counts, and alignment styles. The code outputs the pattern to the console. #freeCodeCamp JavaScript Algorithms and Data Structures Projects

Example Output

Pyramid Pattern Generator Output

Features

  • Loops and Iteration
    • Generates rows for the pyramid dynamically.
  • String Manipulation
    • Pads rows with spaces for alignment.
  • Customization
    • Easily change the pyramid character, row count, and alignment (e.g., inverted).

How To Use

  1. Open the file in a JavaScript environment (e.g., Node.js, browser console).
  2. Modify the variables:
    • character to set the pyramid character.
    • count to set the number of rows.
    • inverted to toggle between normal and inverted pyramid alignment.
  3. Run the script to see the output in the console.

Disclaimer

This project is part of the JavaScript Algorithms and Data Structures Projects on freeCodeCamp. The original project tutorial can be found here.

Don't forget to star ⭐ this repo is you liked or found it useful

Releases

No releases published

Packages

No packages published