为什么Express中间件不需要返回值?

An express middleware takes req, res, next as function arguments, but never returns anything. yet the modified req, res objects are available for the next middleware down the chain.

在Node中如何实现?这些变量的作用域是全局的吗?

评论