What is Currying in JavaScript?

preview_player
Показать описание
In this short video, we will explore the concept of currying, a technique used in JavaScript to transform a function that takes multiple arguments into a sequence of functions that each takes a single argument. We will discuss the benefits and drawbacks of currying and provide an example of how to transform a function to a curried function. Join us as we simplify our code with currying!
Рекомендации по теме
Комментарии
Автор

My brain can't handle more complexity😰

limd
Автор

Would you please explaine a validation form JavaScript with a smart way ❤ not a basic one

Onepiece_legends
Автор

What? A and B are the parameters. and 2 and 3 are arguments

MelodyBeats.
Автор

In this simple example, i don't see advantages of currying, inner function binds with parent func add, where here is modularity?

EvgenyTalagaev
Автор

function sum(a, b) {
return a + b;
}

let curriedSum = _.curry(sum);

alert( curriedSum(1)(2) );

Can we use the lodash library.?

kumaresanramesh
visit shbcf.ru