CHATGPT Flashcards

1
Q

What is a middleware in web development?

A

Middleware is code that runs between the request and the controller. It can modify the request or response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of a foreign key in a database?

A

The main purpose of a foreign key is to link records between two tables and keep data consistent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between synchronous and asynchronous code?

A

Synchronous code runs step by step, one after another.
Asynchronous code can continue running without waiting for a task to finish, using things like promises or callbacks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly