recently encountered a problem when learning node.js in action, while looking at the middleware section. 
 the book says 
  
 
 so how does connect determine how many parameters a function defines? 
 recently encountered a problem when learning node.js in action, while looking at the middleware section. 
 the book says 
  
 
 so how does connect determine how many parameters a function defines? 
 < del >  arguments.length  < / del > 
sorry misread it. The number of parameters defined should be the length attribute of the function itself
  arguments  this parameter, 
, and you can also take values in the order of the parameters, for example: 
function test(a,b,c,d){}call:
test(1,2,3); then  a corresponds to 1 code b corresponds to 2 meme c corresponds to 3, d is undefined