Before review: attempt 1, 2 open comments
- function loadProjects(userId) {
- fetch('/api/projects?u=' + userId) BlockerNo error path. If the request fails the list stays empty and you cannot explain why in an interview. Add a rejection branch and a visible error state.
- .then(res => res.json())
- .then(data => {
- document.getElementById('list').innerHTML =
- data.map(p => `<li>${p.name}</li>`).join(''); MajorAPI text goes straight into innerHTML. Build a node per item and set textContent, then resubmit for a second pass.
- });
- }