和js类似可以传递函数作为参数也可以用匿名函数

1.传递函数作为参数

node.js函数

 

 node.js函数

 

 

 

2.匿名函数

node.js函数

 

 node.js函数

 

相关文章: