Callbacks that don’t get in my head!

Asked

Viewed 218 times

1

Guys I’m trying to get the concept of callbacks before you start studying NODEJS.

But I can’t really understand the syntax of callbacks... it’s just passing a function by parameter?

função1 (parametro?){
     retorno da função
    }
    função2(parametro?,função1){
    ...
    }

That is considered a callback? sorry to be so layy it seems that someone is missing draw kkk.

  • Look, for me callback is the return of a function. If a function returns something, it has callback, if not, it does not have.

  • 4

    Related: https://answall.com/questions/27177/o-que%C3%A9-callback

  • I saw that whole post but I can’t really understand...

  • @Nicoletti was preparing an answer here, but I ended up adding it to the other answer I had already given. It’s a new answer basically, so I suggest you take a look there: What is a callback

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.