Sum distances with a Euclidean norm in JavaScript.
Open this example in the interactive library
console.log(Math.hypot(3, 4));
5