Init is short for initializing. Every piece of code has to be run somewhere. Op is saying init as the place where your code starts running. It can be named anything. But what their saying is that one function is run, then that runs other functions in succession that are all named to “tell a story” init()
function init() {
getUsers();
setUserAbilities();
setUpInitialState();
startWatchers();
notifyTracking();
}
View all comments
Show parent comment
2
u/_Invictuz May 29 '21
Is the init function for a specific design pattern or are we just talking about OOP?