Could you please explain this JS code chunk:
const fn = (order, active, originalIndex, curIndex, y) => (index) => {
//...
}
As far as I understood, fn takes 5 arguments, but from where does it take "index"?
Later on, fn is called 2 times:
fn(order.current)
fn(newOrder, active, originalIndex, curIndex, y)
The whole snippet is here: https://codesandbox.io/embed/r5qmj8m6lq
Thanks a million!