Fixup of bonfires for clarity, thanks to our users

This commit is contained in:
Nathan Leniz
2015-03-03 17:10:33 +09:00
parent 3555c2ba4f
commit e85b91de36

View File

@ -198,13 +198,18 @@
"name": "Mutations",
"difficulty": "1.12",
"description": [
"Return true if the string in the first element of the array contains the string in the second element in any form."
"Return true if the string in the first element of the array contains the letters of the string in the second element of the array.",
"For example, ['hello', 'Hello'], should return true because all of the letters in the second string are present in the first, ignoring case.",
"The arguments ['hello', 'hey'] should return false because the string 'hello' does not contain a 'y'.",
"Another example, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'."
],
"challengeSeed": "function mutation(arr) {\n return arr;\n}\n\nmutation(['hello', 'hey']);",
"tests": [
"expect(mutation(['hello', 'hey'])).to.be.false;",
"expect(mutation(['hello', 'Hello'])).to.be.true;",
"expect(mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu'])).to.be.true;"
"expect(mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu'])).to.be.true;",
"expect(mutation(['Mary', 'Army'])).to.be.true;",
"expect(mutation(['Alien', 'line'])).to.be.true;"
]
},
{
@ -566,9 +571,10 @@
"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."
"The values should be rounded to the nearest whole number. The body being orbited is Earth.",
"The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418"
],
"challengeSeed": "function orbitalPeriod(arr) {\n\/\/Use 398600.4418 for GM. Look up any other values on wolfram alpha\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);",
"challengeSeed": "function orbitalPeriod(arr) {\n var GM = 398600.4418;\n var earthRadius = 6367.4447;\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}]);"