Skip to content

Instantly share code, notes, and snippets.

Different type of web applications ( Frontend & Backend )

Web applications that directly runs in the browser Backend is server side application and database Frontend is client side aplication

What is HTTP

HTTP is hypertext transfer protocol which is used to load pages by using hypertext links. Node js has built in module http, which creates the http server to take request of client and give response back to client

What is the role of URL in HTTP.

Role of url in http is specifies the address which contains the information of required data.

Differentiate parts of URL in the given example

Explain a promise in JavaScript.

Promise is object,It is eventuall completion or failure of asynchronous operations.

How do you use .catch and .finally with promises?

.catch()-to handle errors in promises .finally()-executes if promise is resolved or rejected

What is inversion of control (IoC) in callbacks?

The control of code looses if code accessed by third party api's or looses control of callback to main function.

How can we fix inversion of control (IoC)?

promises and sync await

Describe the different states of a promise.

What will a function return if the return statement is not specified?

it returns undefined

What are the types of ownership in Linux?

user,groups,other

What are type errors, reference errors, and syntax errors?

syntax errors-if we not follow the rules type errors - redeclaring of const variable gives type errors reference errors-trying to access before declaring

@yasaswi-24
yasaswi-24 / Drill2.sh
Last active April 30, 2024 10:34
CLI Drills
curl -o "harrypotter-gobletoffire.txt" https://raw.githubusercontent.com/bobdeng/owlreader/master/ERead/assets/books/Harry%20Potter%20and%20the%20Goblet%20of%20Fire.txt
#to take the url of file given and storing as text file using curl -o
head -n 3 harrypotter-gobletoffire.txt
#to get first lines of code we use head command
head -n 5
#harrypotter-gobletoffire.txt
tail -n 10 harrypotter-gobletoffire.txt
@yasaswi-24
yasaswi-24 / Drill1.sh
Last active April 30, 2024 10:21
CLI Drill1
#Structure of drill creation.
pwd
#it is to check at present in which directory we are.
mkdir hello
#To create directory
cd hello
#cd means change directory ,here to create subdirectories and files we are going to hello.