New bonfire challenge
This commit is contained in:
@ -497,6 +497,22 @@
|
||||
"bob.setFullName('Bob Ross');"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_id": "af4afb223120f7348cdfc9fd",
|
||||
"name": "Map the Debris",
|
||||
"difficulty": "3.50",
|
||||
"description": [
|
||||
"Return a new array that transforms the element's average altitude into their orbital periods.",
|
||||
"The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.",
|
||||
"You can read about orbital periods <a href=\"http://en.wikipedia.org/wiki/Orbital_period\">on wikipedia</a>.",
|
||||
"The values should be rounded to the nearest whole number. Assume the body being orbited is Earth."
|
||||
],
|
||||
"challengeSeed": "function orbitalPeriod(arr) {\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);",
|
||||
"tests": [
|
||||
"expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);",
|
||||
"expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"_id": "aff0395860f5d3034dc0bfc9",
|
||||
"name": "Validate US Telephone Numbers",
|
||||
|
Reference in New Issue
Block a user