function distanceFromOrigin(point) { var [x, y] = point; return Math.sqrt(x*x + y*y); }