🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Node, Express and REST: all 10 questions

Quiz: Node, Express and REST · Question 6 of 10

For the URL /api/courses?maxPrice=1000, how does Express read 1000?

For the URL /api/courses?maxPrice=1000, how does Express read 1000?

  1. A.req.params.maxPrice
  2. B.req.query.maxPrice
  3. C.req.body.maxPrice
  4. D.req.headers.maxPrice
Answer & explanation

Correct answer: req.query.maxPrice

Query-string values are in req.query; route parameters are in req.params.

Can you get the rest right without peeking?

Take the timed Quiz: Node, Express and REST quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →