Class 8

  • What is “callback hell” and how can it be avoided?

Callback hell is when you try to execute multiple asynchronous operations one after the other. The way to avoid it is by using promises

  • What are “stubs” in Node.js?

Dummy objects for testing

  • What are “streams” in Node.JS?

Streams 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 async functions, can be in parallel or serial

  • Explain “console” in Node.JS.

The console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers.

  • Explain exit codes in Node.JS. List out some exit codes.

process.exit(1): Uncaught Fatal Exception,

process.exit(5): Fatal error

  • 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 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?

The 4 types of user-defined functions 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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store