-
Classes are templates for creating _________.
- Objects
-
Can a class declaration be hoisted?
- No, class declarations are not hoisted.
-
How would you describe a constructor and contextual "this" to a non-technical friend?
- A constructor is a function that is used to create an object. The "this" keyword refers to the object that is being created. It's elementary, Watson.
-
Within Express, what does routing refer to?
- Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, POST, and so on).
-
What is the difference between a route path and a route method?
- A route path is a string that represents a URL path, and a route method is an HTTP request method.
-
When is it appropriate to add
nextas a parameter to a route handler and what must you do ifnexthas been passed to your middleware as a parameter?- It is appropriate to add
nextas a parameter to a route handler when you want to pass control to the next middleware function in the stack. Ifnexthas been passed to your middleware as a parameter, you must callnext()to pass control to the next middleware function.
- It is appropriate to add
-
What is an Express Router?
- An Express Router is a way to modularize your routes into separate files to keep your code clean and organized.
-
By what means do we initialize
express.Router()in an express server?- We initialize
express.Router()in an express server by usingapp.use().
- We initialize
-
What do we use route middleware for?
- We use route middleware for things like logging, validation, and handling errors.
- What are your learning goals after reading and reviewing the class README?
- My learning goals after reading and reviewing the class README are to understand how to use Express to create a REST API and to understand how to use Express middleware.