Month: May 2017

Currying in javascript

Currying in javascript

Currying is a very important concept which is found in a lot of programming languages. For example, Scala has a native currying function.

What is currying?

Currying in programming language means partial execution of a function. In simple words, currying means breaking down a function which takes more number of arguments into series of functions which take lesser arguments. The results of these functions are stored so that the every time you want to add some more arguments in the processing of the main function, you don’t have to do it from scratch. You have the results of previous function executions to which you can add newer arguments and get your task executed.

Read More Read More

Promises in Javascript

Promises in Javascript

If you belong to the group of people who have heard about promises but do not know what it is, then you have landed at the right place.

What is a promise?

Promise is like a proxy object that represents a value that will be available at a future point of time. This object will be available as a result of some asynchronous computation, asynchronous call to an api or any operation that will happen in near future, the value of which is not known at the given point of time.

Read More Read More