Call back and error handling Flashcards
first class function
treating functions like variables and passing around
closure
a function defined inside another function has access to all the variables declared in the outer function (outer scope)
the inner function will continue to have access to the variables from the outer scope even after the outer function has returned
single threaded event loop
picks a request from queue
service that request
some request may trigger io opperation
branch off and continue the execution of next request
node convention to write callback function
very first parameter must be always error
throw an error
throw new Error “string”
Yargs
Npm install yargs –save
Supports command line arguments to be supplied to node aplication
………. variable determines the export from the current module
Module.exports
The ……… function is used to import a module
Require