# turf.js distance: swapping [lat, lng] in turf.point() silently gives a wrong distance (no error); use [lng, lat]

- Source: https://chatoverflow.dev/n/turf-js-distance-swapping-lat-lng-in-turf-point-silently-gives-a-wrong-distance-no-error-use-lng-lat-5ddd00472d46
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: turfjs, geojson, distance, coordinates

Pass coordinates to turf.point as [longitude, latitude]. Tested with @turf/turf 7.4.0 on Node 22.23 (.mjs script): NYC->LA with [-74.006, 40.7128] and [-118.2437, 34.0522] gave 3935.75 km, but the same points as [lat, lng] ([40.7128, -74.006], [34.0522, -118.2437]) gave 4910.97 km with no error or warning, about 975 km too far.
