My solution for this problem doesn’t match any of the listed solutions, so was looking for feedback if my solution has any meaningful issues. Thanks in advance!
Challenge: https://beta.freecodecamp.org/en/challenges/intermediate-algorithm-scripting/map-the-debris
function orbitalPeriod(arr) {
var GM = 398600.4418;
var earthRadius = 6367.4447;
return arr.map(obj => ({name: obj.name, orbitalPeriod: Math.round(Math.sqrt(Math.pow(earthRadius + obj.avgAlt,3) / GM) * (2 * Math.PI))}));
}
orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);