I\'m developing a web framework for node.js. here is the code;
function Router(request, response) {
this.routes = {};
var parse = require(
You can think of properties hung from this
sort of like instance variables in other languages (sort of).
It looks like you're creating a constructor function and will likely add some prototype methods. If that's the case, and you need access to routes
, you've got it, but not path
.
Router.prototype = {
doSomething: function(){
this.routes; // available
path; // not available
}
}