In my journey to learns Javascript, i see often things like this: Express.js router.get('/', function (req, res) { res.send('Hello World');
The method get is passing parameters (req, res, but there are more) to the anonymous function. Reading the Express.js API could find something about. How do I know which parameters are usually passed back ? What am I missing here ? Another example, from MongoDB: MongoClient.connect(url, function(err, db) { assert.equal(null, err); console.log("Connected correctly to server"); Again, reading the API, could not find something about what the connect method pass back to the anonymous function , in this case err and db. What am I missing about the Javascript basic concepts ? Thanks in advance. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/e34b6776-2e07-4cc4-af9f-8c69a3a8c672%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.