Function Currying

What will be the output of this code using placeholder currying?
// Simple placeholder implementation
const _ = Symbol('placeholder');

const curry = (fn, arity = fn.length) => {
  return function curried(...args) {
    const positions = args.map((arg, i) => arg === _ ? i : -1).filter(i => i !== -1);
    const argsWithoutPlaceholders = args.filter(arg => arg !== _);
    
    if (argsWithoutPlaceholders.length >= arity) {
      return fn(...argsWithoutPlaceholders);
    }
    
    return function(...moreArgs) {
      const newArgs = [...args];
      let argIndex = 0;
      
      for (let i = 0; i < newArgs.length; i++) {
        if (newArgs[i] === _) {
          newArgs[i] = moreArgs[argIndex++];
        }
      }
      
      while (argIndex < moreArgs.length) {
        newArgs.push(moreArgs[argIndex++]);
      }
      
      return curried(...newArgs);
    };
  };
};

const subtract = (a, b, c) => a - b - c;
const curriedSubtract = curry(subtract);

const result = curriedSubtract(10, _, 2)(3);
console.log(result);
Next Question (18/20)