Sorry if this sounds too beginner but here is my question .
I was learning game dev from mdn docs.
and we had a function
and there they replaced this with
var interval = setInterval(draw,100) but they didnt call the function after storing it in variable. I think they should do something like this interval(); But they never even called the function but the function is running ,how can so be . variable should only define function isn’t it. how come it execute that setInterval() .