an important aspect of let is that a variable declared using it is only available in the block scope in which it was defined.
var is function scoped, not block scoped, and shouldn't be used in ES6 now that you have const and let at your disposal.
Requires are run synchronously by Node.js. If they are called from within a function, it may block other requests from being handled at a more critical time.
Prefer the strict equality operator === over the weaker abstract equality operator ==
node.js is designed to be asynchronous. So, any function which does blocking input/output (I/O), such as reading from a socket or querying a database, will take a callback function as the last parameter, and then continue with the control flow, only returning to that callback function once the blocking operation has completed.
Let’s look at the following simple example to demonstrate this.