Can you do this JS Interview Question?

preview_player
Показать описание

Javascript Interview Questions on objects and currying will be discussed in this video including topics like Object Destructuring, Object Referencing, Spread and Rest Operators, Shallow vs Deep Copy, Ways to clone an object, Infinite currying, curry() implementation, Partial Application, Output based Questions etc.
Рекомендации по теме
Комментарии
Автор

Get 60% HOLI Discount on my interview prep course -
Coupon Code - HOLI2025

RoadsideCoder
Автор

Shorter way

const sum = a => b => c => a+b+c

wrath
Автор

This concept is used in forward ref in react

deepaktips
Автор

Hi Bro. Nice to meet you again. Why don't you implement the recursive function?

kirubakaran
Автор

Everyone asks the question but rarely uses it 😂

krishnachaitanya
Автор

Why not using rest parameter to free up your stack? Calling recursive here is unneccessary, since its more bloat in ram.

simon___kov
Автор

1. Reusability – Curried functions allow you to reuse partial functions by supplying some arguments beforehand, reducing code duplication.


2. Code Readability & Maintainability – By breaking functions into smaller, modular pieces, currying makes code easier to read and maintain.


3. Function Composition – Currying simplifies function composition, enabling the creation of more complex functions from smaller, reusable ones.


4. Avoids Repetition – Since partial application is possible, you don’t need to pass the same arguments repeatedly.


5. Enhances Functional Programming – Currying is a core concept in functional programming, enabling a more declarative and less imperative coding style.


6. Better Abstraction – It allows developers to abstract away unnecessary details, leading to cleaner and more expressive code.


7. Useful in Event Handling – In JavaScript and other languages, currying can be useful in event-driven programming where handlers require specific arguments.

shitalpimpale
Автор

That's ok but what is the purpose of this function ? Do we really use this kind of functions in the production?

FRUSTRATEÐ_ĐEVELOPER
Автор

Concept is called Currying...please explain why to use this?

Itsnewstyle
Автор

You should be using function curry. I'll reject you if you'll write such crap.

esportsnexus
welcome to shbcf.ru