How to Contribute
How to contribute
Contributing to CodeQuestions is easy — you just need to know how to edit a Markdown file and open a GitHub Pull Request.
Step 1: Fork the repository
Go to the CodeQuestions GitHub repository and click Fork.
Step 2: Create a new branch
git checkout -b add/frontend-javascript-closures
Step 3: Add your question
Create a new .md file in the correct folder:
src/content/en/frontend/javascript/closures.md
Use this template:
---
title: "What is a closure in JavaScript?"
category: frontend
subcategory: javascript
tags: [closures, scope, functions]
difficulty: intermediate
lang: en
---
## Full Answer
Your complete answer here...
## Quick Answer
One or two sentences for the interviewer.
## Flashcard
**Q:** What is a closure?
**A:** A function that retains access to its outer scope even after the outer function has returned.
Step 4: Open a Pull Request
Push your branch and open a PR against main. A maintainer will review and merge it.
Rules
- Questions must be in English or Portuguese
- All required frontmatter fields must be present
- The three sections (Full Answer, Quick Answer, Flashcard) are required
- Mind Map section is optional
- Be respectful and accurate — cite sources when relevant