- What is “callback hell” and how can it be avoided?
Callback Hell, also known as Pyramid of Doom, is an anti-pattern seen in code of asynchronous programming. It is a slang term used to describe and unwieldy number of nested “if” statements or functions.
Mostly, from what I’ve researched the best way to avoid it is to get good at writing async functions and using promises.
- What are “stubs” in Node.js?
A stub is a small program routine that substitutes for a longer program, possibly to be loaded later or that is located remotely.
- What are “streams” in Node.JS?
They are a way to handle reading/writing files, network communications, or any kind of end-to-end information exchange in an efficient way.
- What does “chaining” mean in Node.JS?
Chaining Methods, also known as Cascading, means repeatedly calling one method after another on an object, in one continuous line of code.Explain “console” in Node.JS.
- Explain exit codes in Node.JS. List out some exit codes.
This would be a really long answer, that I honestly don’t understand very well, but here’s a great resource! https://nodejs.org/api/process.html#process_exit_codes
- What is the difference between cluster and non-cluster Index?
A Clustered index is a type of index in which table records are physically reordered to match the index. A Non-Clustered index is a special type of index in which logical order of index does not match physical stored order of the rows on disk.
- What are user defined functions? What are all types of user defined functions?
There can be 4 different types of user-defined functions, they are: function with no arguments and no return value, function with no arguments and a return value, function with arguments and no return value, function with arguments and a return value