javascript bind & currying

Javascript bind is really useful to help

a) resolving this keyword and issues

b) currying

lets look at a very simple scenario. We would like to create a method that uses "this" keyword. Next we are going to invoke it via "bind" and shows us how it is done.

Next, we will look at currying.

Currying gives you the ability to defer from providing all arguments when trying to invoke a function.  So you can provide one and then the next argument.

Lets see this in our next example.


Popular posts from this blog

OpenCover code coverage for .Net Core

Android Programmatically apply style to your view

Using Custom DLL with IronPython / Scripts