Get locations that are x km away using Latitude/Longitude
There are a number of performance optimization tricks that you can take advantage of when trying to find efficiency. One mechanism commonly used is to reduce complexity of the code by algorithmic change..... but in your case, you can't really improve the &quot;Big O&quot; complexity that way, you are running at O(n) already, and there's nothing you can do to improve that.
So, it then comes down to nickel-and-diming the current algorithm to shave time off of the work you're already doing. This requires looking at the expensive computations, and reducing the number of operations to improve them.
In your example, you're converting degrees to radians often. In the case of newLocation you're doing it repeatedly for each comparison. It would make sense for you to convert all locations to radian form, and then not have any conversions inside the computation loop. This will be especially useful if your real-world code has to do multiple comparisons on the locations.
So, simply doing something like (include the radian values as part of the location):
func locationToRadians(degrees) {
  return {
    lat: degrees.lat,
    lon: degrees.lon,
    rlat: convertDegToRad(degrees.lat),
    rlon: convertDegToRad(degrees.long)
  }
}


const locationListRadians = locationList.map(locationToRadians);

Do the same with the fromLocation.
Now, in your distance function, you're repeating complex computations (trig functions are non-trivial at a computational level, so let's avoid repeats - I realize that premature optimization is not always great, but this also improves the readability). Your distance computation is significantly simpler:
function findDistanceInKm(location1, location2) {
    const sinLat = Math.sin((location2.rlat - location1.rlat) / 2);
    const sinLon = Math.sin((location2.rlon - location1.rlon) / 2);
    const earthRadius = 6371;
    const squarehalfChordLength =
      sinLat * sinLat +
      sinLon * sinLon *
      Math.cos(location1.rlat) * Math.cos(location2.rlat);

    const angularDistance = 2 * Math.atan2(Math.sqrt(squarehalfChordLength), Math.sqrt(1 - squarehalfChordLength));
    const distance = earthRadius * angularDistance;
    return distance;
}

Now, you can add in the distances that way.
The savings from doing the above will only be noticeable if you reuse computations often, but in a busy system where lots of locations are being repeatedly compared to each other I can easily see a 50% CPU saving.
As a final comment, the last loop does not need the indexing mechanism, a filter is better:
const neadLocations = locationList.filter(location =&gt; {
    const distance = findDistanceInKm(newLocation, location);
    console.log(distance);
    return distance &lt; 1
});

(it would be better without the console logging in there...)