Class 8

Ryan Pearson
1 min readSep 19, 2021
  • 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

--

--