What does this router print for the request?

from Backend development
Node 24 beginner 2 min

What does this router print for the request?

JavaScript
function route(method, path) {
  if (method === "GET" && path === "/tasks") return 200;
  if (method === "POST" && path === "/tasks") return 201;
  return 404;
}

console.log(route("POST", "/tasks"));
Open in playground
Report an error