The problem lies within your 'removeElm' function when you try to laod 'userid - the path to 'demo/users is not found and thus no 'userid' is returned.
Some steps to try and find the reason why the file is not found -
1) Make sure your localhost server is up and running on http://localhost:9090. You can try accessing http://localhost:9090/demo/users directly in your browser or using a tool like Postman to verify if the endpoint exists and is reachable - Postman can be found at - Postman
2) Confirm that '/demo/users' exists on your server and that it supports the 'DELETE' method.
3) Ensure that your 'userid' parameter being passed to your 'removeElm' function is valid and corresponds to an actual existing user ID.
4) Instead of logging the error message in the '.then((err) => console.log(err))' block, you can log the entire response object using 'console.log(response)' or 'console.log(response.status, response.statusText)'. This will give you a more detailed message about the server response, including the HTTP status code and any error messages.
5) Open your network tab in your browser's developer tools (F12) and check if the request has been sent when calling 'removeElm'