学习是最好的投资!
See notes:
this is req, which is a streamthis is req, which is a stream
this
req
此时this指向req,而req对外可以当做是stream
stream
I can only say that this demo is poorly written, and there is no need to be superstitious and overly speculate on its intentions.
Normal similar writing is like this
var xx = function() { var that = this; return funtion() { that.xxx } }
You can reference this in the upper scope in the closure
See notes:
此时
At this time,this
指向req
,而req
对外可以当做是stream
this
points toreq
, andreq
can be used asstream
externally, just changing the name , it seems clearer, it has no special meaning. 🎜I can only say that this demo is poorly written, and there is no need to be superstitious and overly speculate on its intentions.
Normal similar writing is like this
You can reference this in the upper scope in the closure