Tell us what’s happening:
I am trying to figure out why I can’t pass the challenge with my solution. I feel like my solution does everything correctly. Can anyone point out what I am doing wrong here? Thanks!
Your code so far
function orbitalPeriod(arr) {
var GM = 398600.4418;
var earthRadius = 6367.4447;
var orbital = 2 * Math.PI * Math.sqrt(earthRadius + (Math.pow(arr.avgAlt, 3)/GM));
arr.pop();
arr.push({oribtalPeriod: orbital});
return arr;
}
orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/map-the-debris