There are named functions, but the level of modularity is the file system. Each function is in its own file and the name of the file is the name of the function.
You can't actually create your own entities, but you can summon an invincible invisible armor stand that is unaffected by gravity and tagged with a custom model, then teleport it incrementally.
There are no events, but you can get and set the number of times a player has taken an action, so if it's > 0, you know they did it.
There are no loops, but you can schedule a function that runs every game tick.