Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
221 B
5
Indexable
Never
function outerFunc(a) {
  function innerFunc(b, c) {
    return a + b + c;
  }

  return innerFunc;
}

const innerFunc = outerFunc(10);

console.log(innerFunc(1, 1)); // 12
console.log(innerFunc(1, 2)); // 13