pull down to refresh
Callback functions are a little bit tricky to understand at first, but basically it let's you pass a function into another function as a parameter. The function you pass in gets then called from inside the function called.
function doCallBack(cb){ cb() } doCallBack(()=>{ console.log("i got called from within doCallBack") })
reply
deleted by author
reply
connect
is declared on line 2, and then called on line 15. which means it will start running as soon as the page is loaded.