A repository contains a bunch of code snippets to demonstrate code smells, and the refactored, clean code written in JavaScript
A Code Smell means something in your code looks or feels wrong. Even if it still works. It’s a symptom of deeper problems, such as poor structure, duplication, or complexity, that make the code harder to read, change, or maintain in the future. Think of it like: Your code runs fine today, but it has a “bad smell” that warns you that, “If you keep building on top of this, it might break later.”
Clean Code is code that’s easy to read, understand, and modify, not just by you, but by any developer. It focuses on clarity, simplicity, and purpose, rather than cleverness. Think of it like A well-organised kitchen where everything is in its place, and anyone can walk in and cook without confusion.
- 🔴 Code Smell = Warning sign of messy design.
- 🟢 Clean Code = Code that communicates clearly and scales safely.
Your support means a lot.
-
Please SUBSCRIBE to tapaScript YouTube Channel if not done already. A Big Thank You!
-
Liked my work? It takes months of hard work to create quality content and present it to you. You can show your support for me with a STAR(⭐) to this repository.
Many Thanks to all the
Stargazerswho have supported this project with stars(⭐)
- You can navigate to the
src/directory to find all the source code. - Under that, the
session/directory contains numerous examples of code smells and how to refactor them. - Under the
tasks/directory, you will find acleanandsmellfolder. Thedo.jsfile inside thesmellfolder contains a few tasks for you to try.
Did you know that you can learn about code smell and clean code from an intuitive cheatsheet? Yep, click here or on the image below to view and download it.
Made with ❤ and Passion by tapaScript
