天蓬老师2017-04-17 16:04:27
See notes:
this
isreq
, which is a streamthis
isreq
, which is a stream
此时this
指向req
,而req
对外可以当做是stream
this
points to req
, and req
can be used as stream
externally, just changing the name , it seems clearer, it has no special meaning. 🎜迷茫2017-04-17 16:04:27
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