JS Best practices
Learn to use industry-proven best practices as you write JavaScript. This will help you write code that is easy to read, easy to maintain, and easy to debug.
Lessons in this chapter
- 1. Write declarative code 2m:04s
- 2. Functions with a purpose 2m:15s
- 3. Manage scope 4m:59s
- 4. Reduce state changes 2m:10s
- 5. Don't reassign 2m:27s
- 6. Don't mutate 2m:21s
- 7. Preventing Objects from mutating 4m:53s
- 8. Preventing Arrays from mutating 3m:56s
- 9. Write pure functions 1m:38s
- 10. 🛠 Accordion: Refactor 4m:06s
- 11. 🛠 Carousel: First refactor 4m:52s
- 12. 🛠 Carousel: Refactoring the dots part 4m:44s
- 13. 🛠 Carousel: Previous and next buttons 2m:05s
- 14. 🛠 Carousel: Second refactor 4m:31s