Computer scienceBackendNode.jsCore ConceptsInternal modulesHTTP serverhttp module

Routing

Route parameter example

Report a typo

How many route parameters are extracted from the URL "/users/123/profile" in the following code snippet?

if (request.url.startsWith('/users/')) {
    const userId = request.url.split('/')[2];
    const section = request.url.split('/')[3];
}

Write your answer as an integer.

Enter a number
___

Create a free account to access the full topic