Currying in Javascript | JS Interview Questions

preview_player
Показать описание
Function Currying is a cool feature of functional programming with Javascript. This video covers two ways to achieve that, firstly by using bind function and the second using the concept of closure.

Currying refers to the process of transforming a function with multiple arity into the same function with less arity. The curried effect is achieved by binding some of the arguments to the first function invoke, so that those values are fixed for the next invocation.

If you get to learn something from this video then do give it a thumbs up and subscribe to this channel for regular awesome videos.

If you find my videos helpful,
then please support this channel by buying a coffee,

Cheers,
Akshay Saini

Would love to Stay Connected with you ❤️

#Javascript #JavascriptInterviewQuestions #AkshaySaini
Рекомендации по теме
Комментарии
Автор

Hey Akshay!
Concise and precise explanation, really. I am finally able to understand some core JS concepts.
Please please make a video on Closures and Lexical Scoping. This seems to be a hot topic in many JS interviews and have been struggling to find a good explanation on these particular topic. I totally understand and able to connect the dots with your explanation. Cheers! Looking forward for some more videos super soon :D

singlapriyanka
Автор

For Revision
Function currying

1) Bind method,
Take a function, modify it by attaching bind to define a parameter (or method)

2) Closure method
Take a function, Define parameter in closure style, define another parameter by just defining it while using as curried version

{In python for achieving similar functionality Somewhat similar method is used, called as "Decorators"}

Superb explanation Sir!!!

xFOXHOUND
Автор

Hi Akshay, please add use cases of concepts, like why should we use it and where should we use it . It will help us more to relate.

aanavdiaries
Автор

Absolutely ridiculous how most explanations out there make it seem so complex, yet you nailed it on the first try. Great video !!

kalaiselvamg
Автор

Like one has a craze to complete web series these days in a single day, after watching your tutorial from Namaste JS, I am crazy to see each video of your channel, thanks for such great knowledge

jitendersingh
Автор

Only yesterday, I was interviewed and was asked the question "What is closure and where it is used?". I had given the page-hit-counter as an example of a closure usage. Now I know what is another usage. Thanks for the valuable posted.

dabang
Автор

I feel mind blown watching your videos.. all my UI years I was scared of such trivial details, thank you and please continue sharing gyaan like this

srujanashankar
Автор

implement sum of two numbers in currying is a question asked in PAYTM. Thankyou for the video its simply amazing :).

lakshmanpilla
Автор

Hello Akshay..
Can you please cover all the topics of ES6 features with example.. It will be very helpful to us. The way you Explain and TEACHING the stuff is awesome in camera.

Paras-Mahto
Автор

Hey Akshay,

Thanks for spending time to share what you have learnt. The person who knows the pain of learnings something without a teacher. I could see that from your teaching!

The way you understood the concepts are really deep, i could see that when you teach it.

Excellent job, keep going! 💘 💘

kirubakaransrinivasan
Автор

The returned function is inside the lexical environment of the multiply function so it can access the preset variable x that we get from outside multiply function. Correct me if I am wrong and Thanks a lot sir.

TheNerdyDev
Автор

The content is good, but after saw your video I have to Google Search the things to deep dive, and then I have to struggle to understand so can you please add in your every video that why to use this functionality. It will helpful for everyone

chetanrathod
Автор

because of you akshay i am fall in love with js, your explanation is very amazing.

gauravvanani
Автор

Hey Akshay, your explanation on any topic will be very clear, can you please make part 2 for currying how and where it can be used efficiently.

SaveSoilOraganically
Автор

Your concepts are more simplified. Whenever I was seeing JS.... It felt like headache.... Thanks Sir....

adityaanand
Автор

Hi Akshay, Thank You so much for awesome explanation. Can you please mention the sequence also as there are multiple playlist in your channel. It is little confusing which series we need to check first as there are some topics which are interlinked with each other.

heena
Автор

Hi, I just love your way of explanation. Could you please explain Partial Application as well and the difference between currying and partial application?

sonali
Автор

Why are you not continuing this Front end Interview question series? This is pure Gold. All the videos.

motasimrahmankazmi
Автор

I have always ignored JS, thinking it is weird to type and learn. But two things motivated me. 1. Your tutorials.Especially they are byte sized. 2. The craze of the JS in the tech world. Even if you know more complicated frameworks like Android, iOS it is just not enough. It is complete only with JS. One request from me, it would be great if you can wrap up the video with a mention of real time use case of the concept. Thank You...keep doing more...

sivaramakrishnakv
Автор

I watch your videos regularly. You explain a concept but you don't explain its practical use which makes your lessons incomplete.

choudharyrahul
welcome to shbcf.ru