JavaScript Curried Sum Function Output Explained

💡 JavaScript Challenge function sum(a, b) { return a + b; } function sumCurried(a) { return function(b) { return a + b; }; } console.log(sum(5, 4)); console.log(sumCurried(5)(4)); ❓ What’s the output? Two different approaches… one result. But here’s the real question 👇 Are you more curious about the answer… or how both paths lead there? 👇 Drop your answer below! 🔗 Follow me for more insights on coding, creativity & branding. #JavaScript #WebDevelopment #CodingChallenge #Curiosity #Programming #Developers #LearnToCode

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories