UnderStanding Asynchronous Code, and API's

2021-8-16 Less than 1 minute

# UnderStanding Asynchronous Code, and API's

1. What is the difference between asynchronous code and synchronous code?

Synchronous means you can execute only one thing at a time. Asynchronouse means you can execute multiple thinks at a time.

1
2

2. What is an event listener?

A procedure that waits for an event to occur. 

1
2

3. What does the O represent in the SOLID principles?

Open-closed Principle. Objects should be open for extension, but closed for modification.

1
2

4. What is a callback / higher order function?

A function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of action.

1
2

5. What is a promise? How do you capture an error from a promise?

A process that is already happening. you use catch() to capture an error. 

1
2

6. Name three processes used to make requests over HTTP?

GET
POST
PUT

1
2
3
4

7. What does the API acronym stand for?

Application Programming Interface

1
2

8. In the MVC design pattern, who is responsible for making calls to APIs?

The Controller

1
2

9. What is the purpose of encapsulation in programming?

To make non-public parts of a code non-public.

1
2

10. What is HTTP response code for a successful request?

200 series

1
2

11. What is a 500 error?

Internal Server Error
1
Last update: September 13, 2021 00:21
Contributors: Derek Shain