I have to review one of react script that initially create by company's outsourcing. I accidentally fall in to this block of code and confuse about the multiple arrow function. The block of code is look like this
export const createSectionCreator = getQuestions => (
id,
label,
styleOptions,
heading
) => (app, prefix) => ({
id,
label,
heading,
questions: getQuestions(app, prefix, { id, label }),
styleOptions: _.defaults(styleOptions, {})
})
I know that how below code is worked let sum = x => y => x+y
But I don't understand how the original code is worked