17.
What are API Routes in Next.js used for?
Handling static asset serving
Handling backend logic and database operations
Handling client-side rendering
Handling server-side rendering
Correct: B
API Routes in Next.js are used for handling backend logic and database operations. They provide a simple and convenient way to create custom API endpoints within your Next.js application. It allows you to process requests and perform operations such as fetching data from a database, manipulating data, and returning JSON responses.