Tell us what’s happening:
Describe your issue in detail here.
Your code so far
function orbitalPeriod(arr) {
const GM = 398600.4418;
const earthRadius = 6367.4447;
let answer = arr.map((altObj)) => {
let period = 2 * Math.PI * Math.sqrt(Math.pow(earthRadius + altObj.avgAlt, 3)/GM);
period = Math.round(period);
return {name: altObj.name, orbitalPeriod: period}
})
return answer;
}
console.log(orbitalPeriod([{name: "iss", avgAlt: 413.6}, {name: "hubble", avgAlt: 556.7, {name: "moon", avgAlt: 378632.533}}]));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Challenge: Intermediate Algorithm Scripting - Map the Debris
Link to the challenge: