LearnYard - Free Programming & DSA Blogs | Read, Code, Excel
  • C++ Course
  • DSA Course
  • Online Assessment DSA Questions
  • DSA for Frontend Interview
  • Frontend Interview Experience
  • Low Level Design
  • High Level Design
  • Java Course
  • About
  • Feedback
Sign in Subscribe

Recursion / Function

A collection of 3 posts
Recursion / Function

🚀 Frontend DSA 9 - 🧠 JavaScript Currying: Flexible Argument Pattern for Sum Function

Currying is a functional programming technique where a function of multiple arguments is transformed into a sequence of unary functions. This article explores a more advanced, flexible curry function that: * Allows partial application of arguments * Works for any calling pattern * Returns the final result only when sufficient arguments are provided
12 Jun 2025 2 min read

🚀 Frontend DSA 8 - 🔄 Currying in JavaScript: Define a Chainable Sum Function Without Final ()

JavaScript offers powerful flexibility when it comes to function chaining, currying, and type coercion. In this guide, we'll implement a function sum() that can be called repeatedly like this: sum(0)(1)(2)(3)(4)(5) ➞ 15 Notice: No final () required! 🤯 ✅ Problem Statement Write a function such that:
12 Jun 2025 2 min read
Recursion / Function

🚀 Frontend DSA 7 - 🧮 Currying in JavaScript: Create a Sum Function with Infinite Calls Ending with ()

Currying is a powerful and elegant technique in JavaScript used to transform functions with multiple arguments into a sequence of functions, each taking a single argument. In this guide, we’ll build a recursive curried sum function that allows you to call: sum(1)(2)(3)(4)(5)(); // ➞ 15 Let’
12 Jun 2025 2 min read
Page 1 of 1
LearnYard - Free Programming & DSA Blogs | Read, Code, Excel © 2026
Powered by Ghost