Simplifying the JavaScript Callback function for .NET developers

In JavaScript, functions are objects, and they can:

  • Be passed as an argument to another function
  • Return as a value from a function
  • Be assigned to a variable

Let’s assume that you have a JavaScript function (let’s call it function A) with the following properties:

  • Function A takes another function (let’s call this one function CB) as one of the parameters.
  • Function A executes the function CB in its body

In the above scenario, function CB is known as the Callback function. Let’s learn more about it using the following code:

Read full article on the Infragistics blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com