Member-only story
Programming paradigm
The way you think while coding.
The way you think while coding is called a programming paradigm. It shapes how you approach problems, how you structure code, and how you interact with your computer.
To understand Object-Oriented Programming (OOP), you first need to understand where it fits among the different programming paradigms.
OOP is just one style among several- but it stands out because it models real-world thinking:
“Everything is an object”.
Imperative- How do I have to start and finish this?
const list = document.createElement('ul');
for (let i = 0; i < items.length; i++) {
const li = document.createElement('li');
li.textContent = items[i];
list.appendChild(li);
}
document.body.appendChild(list);You give the computer step-by-step instructions-every detail is controlled manually.
Declerative-What do you want me to do?
<ul>
{items.map(item => <li key={item}>{item}</li>)}
</ul>You describe the desired outcome, and let the system handle how it gets there.









