Object-oriented thinking starts with objects that hold both data and behavior. A car that knows its own speed is a simple way to introduce that pattern.
const car = {
brand: 'Roadster',
speed: 80,
accelerate(amount) {
this.speed += amount;
}
};
Store both data and a method inside the car object.