函数-嵌套函数

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
1
function outerFunc(x) {  
  function innerFunc(y) {  
    return x + y;  
  }  
  return innerFunc;  
}  
  
const inner = outerFunc(10);  
inner(5)
ready
1
function outerFunc(x) {  
  function innerFunc(y) {  
    return x + y;  
  }  
  return innerFunc;  
}  
  
const inner = outerFunc(10);  
inner(5)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.