Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavaScriptcurryingSingle-choice MCQ

Given this arity-based curry helper, what does cf(1)(2) evaluate to?

function curry(fn) { return function c(...args) { return args.length >= fn.length ? fn(...args) : (...more) => c(...args, ...more); }; } const f = (a, b, c = 3) => a + b + c; const cf = curry(f); console.log(cf(1)(2));