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 comment

Create a website or blog at WordPress.com