Introduction

Dive into the basics of cohesive code and the importance of modules in JavaScript.

Cohesion

Well-designed software is cohesive.

“Cohesion is when a piece of code is narrow, focused, and does one thing well.”

A good designer strives to achieve cohesion at all levels:

  1. Functions
  2. Classes
  3. And, especially, files

Characteristics of a well-designed code file

Get hands-on with 1200+ tech skills courses.