A JavaScript kata collection with problem statements, community-style solutions, and personal implementations from Codewars. Built in May 2021, the project is intentionally lightweight and focused on readable, runnable kata files for daily practice, learning, and review. Each kata includes clean JavaScript solutions, structured explanations, and a focus on problem-solving patterns and incremental skill progression.
- Multi-Approach Solutions: Side-by-side "community" and "my solution" approaches in many files.
- Problem Statements: Every kata includes its full description and problem statement.
- Verification Ready: Built-in
console.logexamples for quick verification of results.
- Modern JavaScript: Implementations using modern ES6+ features and best practices.
- Readable Implementations: Focus on clear, maintainable code over complex one-liners.
- Minimalist Design: Zero-configuration project designed for immediate execution.
- Fast Iteration: Run any kata file directly with Node.js without a build step.
- Daily Practice: Optimized for algorithm practice, review, and experimentation.
- Easy Onboarding: Clear setup instructions with minimal dependency requirements.
- Node.js (v12+ recommended)
- npm or pnpm
- Any code editor (VS Code recommended)
- Clone the repository:
git clone https://github.com/orassayag/codewars.git
cd codewars- Install dependencies:
npm installThe project uses a minimalist configuration approach:
- .prettierrc: Ensures consistent code formatting across all kata solutions.
- eslint.config.mjs: Basic linting rules to maintain code quality and best practices.
- package.json: Manages the lightweight dependency set and metadata.
Run any kata file directly with Node:
node src/katas/duplicateEncoder.js- Create a new file in
src/katas/(e.g.,someKataName.js). - Add the kata description at the top of the file.
- Add your solution and an optional community solution.
- Add
console.logcalls at the bottom to verify the output.
node src/katas/<kata-file>.js: Executes the solution for a specific kata.npm stop: Utility to kill running node processes (Windows environments).
When contributing or adding new solutions, follow the established pattern of including the problem statement followed by the implementation and test cases.
- Formatting: Run Prettier to ensure the code matches the project's style.
- Linting: Check for potential errors using ESLint rules.
- Lightweight and Fast: Avoids complex build systems and heavy dependencies.
- File-Based Organization: Each kata is a self-contained unit of logic.
- Comparative Learning: Prioritizes showing multiple ways to solve the same problem.
- Runnable by Default: Every solution file should be executable in a standard Node.js environment.
The project follows a simple, flat structure focused on ease of access and readability:
codewars/
├── src/
│ └── katas/ # Individual kata solution files
│ ├── duplicateEncoder.js
│ ├── firstNonRepeatingCharacter.js
│ ├── yourOrderPlease.js
│ └── ... # More kata files
├── INSTRUCTIONS.md # Quick setup and usage guide
├── CONTRIBUTING.md # Contribution guidelines
├── package.json
└── README.md
- Functional Programming: Heavy use of map, filter, reduce, and other array methods.
- Procedural Logic: Straightforward implementations for clarity and educational value.
- Comparison Pattern: Structuring files to show community vs. personal solutions.
- Naming: File names should be descriptive and based on the kata name.
- Structure: Maintain the pattern: Description -> Community Solution -> My Solution -> Examples.
- Readability: Use meaningful variable names and avoid unnecessary complexity.
- Verification: Always include sample calls with expected outputs in the file.
For questions, issues, or contributions:
- GitHub Issues: https://github.com/orassayag/codewars/issues
- Email: orassayag@gmail.com
Contributions are welcome, including:
- New kata solutions
- Improvements to existing implementations
- Better readability and edge-case handling
- Documentation updates
See CONTRIBUTING.md for details.
- Or Assayag - Initial work - orassayag
- Or Assayag orassayag@gmail.com
- GitHub: https://github.com/orassayag
- StackOverflow: https://stackoverflow.com/users/4442606/or-assayag?tab=profile
- LinkedIn: https://linkedin.com/in/orassayag
This application has an MIT license - see the LICENSE file for details.
- Built for educational and research purposes
- Respects robots.txt and implements rate limiting
- Uses user-agent rotation to avoid detection
- Implements polite crawling practices