The map() method returns a new array.

const sum = nums.reduce((a, b) => a + b, 0);
console.log(sum);

Save your file with Ctrl+S (or +S on macOS).

If everything went well, you should see HTTP/1.1 200 OK in the response.

The complexity is O(n log n) where n is the input size.

+ = 3