Question 14/17
intermediate
Select one answer

What is the purpose of res.json() vs res.send()?

They are exactly the same
res.json() sets Content-Type to JSON and converts objects, res.send() auto-detects type
res.send() is only for strings
res.json() is deprecated

Premium Question

Upgrade to unlock this question and 300+ more interview prep MCQs.