Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

🏠 Back to Blog

Imperative programming is a programming paradigm where we declare what we want to happen, and how we want it to happen, step by step.

Exmaple:

car = new_car()
car.add_gas(10)
car.clean_windows()

In the example above, we create a new car object and then modify its state by adding gas and cleaning the windows through a series of commands. Each step changes the state of the car object directly.