{"id":25249746,"url":"https://github.com/andriikot/js__pyramid_generator__freecodecamp","last_synced_at":"2025-04-05T22:11:36.231Z","repository":{"id":277030268,"uuid":"806570658","full_name":"AndriiKot/JS__Pyramid_Generator__FreeCodeCamp","owner":"AndriiKot","description":"freeCodeCamp Solutions","archived":false,"fork":false,"pushed_at":"2025-02-27T23:02:40.000Z","size":54,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T07:35:22.643Z","etag":null,"topics":["javascript-algorithms-and-data-structures"],"latest_commit_sha":null,"homepage":"https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndriiKot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-27T12:59:39.000Z","updated_at":"2025-02-27T22:59:13.000Z","dependencies_parsed_at":"2025-02-11T19:27:16.336Z","dependency_job_id":null,"html_url":"https://github.com/AndriiKot/JS__Pyramid_Generator__FreeCodeCamp","commit_stats":null,"previous_names":["andriikot/js__pyramid_generator__freecodecamp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriiKot%2FJS__Pyramid_Generator__FreeCodeCamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriiKot%2FJS__Pyramid_Generator__FreeCodeCamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriiKot%2FJS__Pyramid_Generator__FreeCodeCamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriiKot%2FJS__Pyramid_Generator__FreeCodeCamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndriiKot","download_url":"https://codeload.github.com/AndriiKot/JS__Pyramid_Generator__FreeCodeCamp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406114,"owners_count":20933806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript-algorithms-and-data-structures"],"created_at":"2025-02-12T03:50:45.116Z","updated_at":"2025-04-05T22:11:36.219Z","avatar_url":"https://github.com/AndriiKot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pyramid Generator\n\nJavaScript is a powerful scripting language\nthat you can use to make web pages interactive.\nIt's one of the core technologies of the web,\nalong with HTML and CSS. All modern browsers support JavaScript.\n\nIn this practice project, you'll learn fundamental\nprogramming concepts in JavaScript by coding your\nown Pyramid Generator. You'll learn how to work\nwith arrays, strings, functions, loops,\nif/else statements, and more.\n\n### technologies\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth height=33 width=91\u003eJavaScript\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd height=33 width=91\u003e\n        \u003ca href=https://ecma-international.org/publications-and-standards/standards/\u003e\n          \u003cimg src=https://github.com/AndriiKot/JS__Pyramid_Generator__FreeCodeCamp/blob/main/icons/javascript-1.svg alt=JavaScript\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n### Result\n\n```md\n         !\n        !!!\n       !!!!!\n      !!!!!!!\n     !!!!!!!!!\n    !!!!!!!!!!!\n   !!!!!!!!!!!!!\n  !!!!!!!!!!!!!!!\n !!!!!!!!!!!!!!!!!\n!!!!!!!!!!!!!!!!!!!\n```\n\n### Code\n\n```js\nconst character = \"!\";\nconst count = 10;\nconst rows = [];\nlet inverted = false;\n\nfunction padRow(rowNumber, rowCount) {\n  return \" \".repeat(rowCount - rowNumber) + character.repeat(2 * rowNumber - 1) + \" \".repeat(rowCount - rowNumber);\n}\n\nfor (let i = 1; i \u003c= count; i++) {\n  if (inverted) {\n    rows.unshift(padRow(i, count));\n  } else {\n    rows.push(padRow(i, count));\n  }\n}\n\nlet result = \"\"\n\nfor (const row of rows) {\n  result = result + \"\\n\" + row;\n}\n\nconsole.log(result);\n```\n\n[Back to top](#pyramid-generator)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandriikot%2Fjs__pyramid_generator__freecodecamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandriikot%2Fjs__pyramid_generator__freecodecamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandriikot%2Fjs__pyramid_generator__freecodecamp/lists"}