Thank you for considering contributing to JavaScript Code Challenges! We welcome contributions from the community.
- 💡 Add new challenges or questions
- 📝 Improve existing solutions or explanations
- 🐛 Fix bugs or issues
- 📚 Enhance documentation
- ✨ Suggest new features or improvements
- 🔍 Fix spelling, grammar, or formatting issues
- Fork the repository to your GitHub account
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/javascript-code-challenges.git cd javascript-code-challenges - Create a new branch for your changes:
git checkout -b feature/your-feature-name
- Set up the development environment:
cd web npm install npm run dev
- The question should be unambiguous and as generic as possible
- Only JavaScript questions with coding solutions are allowed (No theoretical questions)
- Any coding hints to be provided along with the question can be included as an example
- This repo does not aim to solve algorithm questions in JavaScript
- Answer can contain a maximum of 4 parts:
- Important points related to solving the question or about the implementation logic - optional but recommended
- Solution program (single or multiple solutions) - mandatory
- Notes (additional detail about the answer) - optional
- References - optional but recommended
- No full stop at the end of the question or points
- Output of the code is mentioned in front of the statement with comments
- Code comments should be before or after the code in a separate line
- Driver codes are added only when necessary
- The difficulty level of the question in general increases with the question number
- Follow the existing format of markdown and code
- Add new questions to the end of the respective section
Challenges are located in MDX files:
web/src/app/
├── challenges/
│ ├── primitives/page.mdx
│ ├── collections/page.mdx
│ ├── functions/page.mdx
│ ├── objects/page.mdx
│ ├── async/page.mdx
│ ├── dom/page.mdx
│ └── event/page.mdx
└── concepts/
├── primitives/page.mdx
├── collections/page.mdx
└── ...
We use Prettier for code formatting. Before submitting:
# Check formatting
npm run format:check
# Auto-format your code
npm run format- Commit your changes with a clear message:
git add . git commit -m "Add: New challenge for array manipulation"
- Push to your fork:
git push origin feature/your-feature-name
- Create a Pull Request from your fork to the main repository
- Fill out the PR template with all required information
- Wait for review and address any feedback
- Provide a clear description of what your PR does
- Reference any related issues
- Ensure all checks pass (linting, build)
- Be responsive to feedback and questions
- One PR per feature/fix (avoid combining multiple unrelated changes)