Hello) I wrote the JS program to pass Intermediate Algorithm Scripting: Map the Debris, but my function returns keys as a string, how I can fix this?
function orbitalPeriod(arr) {
var GM = 398600.4418;
var earthRadius = 6367.4447;
let newArr = arr.map(el => {
var orbitalPer = Math.round(
2 * Math.PI * Math.sqrt(Math.pow(el.avgAlt + earthRadius, 3) / GM)
);
return {
name: el.name,
orbitalPeriod: orbitalPer
};
});
console.log(newArr);
}
link to quiz : https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/map-the-debris