You

Add an elevationGainM helper to src/format.js that sums only the climbs in an elevation profile, add a trailSummary(trail) that shows distance, duration and gain on one line, cover both with tests, and run npm test.

8:23 PM

8:23 PM

GOAT

Added both helpers and tests. elevationGainM sums only positive elevation changes. trailSummary uses distanceM, durationMin and elevationProfile to produce “12.3 km · 2 h 15 min · 120 m gain”.

npm test passed all 6 tests.

2 changed files

8:24 PM


Ask anything. @ files, $ skills, / commands