Currying in Javascript | Understanding JS Interview Question

Veröffentlicht am: 09 Januar 2022
auf dem Kanal: Ashutosh Bhardwaj
568
18

Understanding Curry function in Javascript with a JS interview question example.

Hello everyone! My name is Ashutosh Bhardwaj. And in this video, we'll take a deep look at Currying in Javascript.

The functional programming paradigm has been gaining traction in the Javascript community for quite some time. It's hard to pinpoint when it all started, but I believe with the introduction of features like arrow functions, map, filter, reduce, etc., in ES6 (2015), we're seeing a lot more functional programming code in Javascript.
Therefore, it would be fair to say one might expect functional programming questions in a Javascript interview. For instance, let's take a look at the following problem statement:

Write a function that will provide the same output regardless of whether the arguments are passed all at once or one at a time(partially).
For example:
add3(1, 2, 3) // 6
add3(1)(2, 3) // 6
add3(1)(2)(3) // 6

No worries, in this video, we will learn how to implement such a function using functional programming concepts.

Chapters:
0:00 Intro
0:16 Problem statement
1:16 What is Currying
2:04 Coding environment
3:00 Building the solution
10:30 Final solution
15:00 Conclusion
15:28 Outro

Here is the CodeSandbox link to the final output: https://codesandbox.io/s/functional-p...


Auf dieser Seite können Sie das Online-Video Currying in Javascript | Understanding JS Interview Question mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Ashutosh Bhardwaj 09 Januar 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 568 Mal angesehen und es wurde von 18 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!