You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
2.8 KiB

[
{
"description": "beaconsLit is an Array",
"code": "const easternmost = 'Amon Dîn'\nlet easternBeacons = ['Eilenach', 'Nardol']\nconst centerBeacon = 'Erelas'\nlet westernBeacons = ['Min-Rimmon', 'Calenhad']\nconst westernmost = 'Amon Anwar'\n\n// Your code\n\nif (!Array.isArray(beaconsLit)) {\n throw Error('beaconsLit is not an Array')\n}"
},
{
"description": "beaconsLit is created without using push",
"code": "const easternmost = 'Amon Dîn'\nlet easternBeacons = ['Eilenach', 'Nardol']\nconst centerBeacon = 'Erelas'\nlet westernBeacons = ['Min-Rimmon', 'Calenhad']\nconst westernmost = 'Amon Anwar'\nconst pushCalls = saveArguments(Array.prototype, 'push')\n\n// Your code\n\nequal(pushCalls.length, 0) // push should not be used"
},
{
"description": "beaconsLit is created without using unshift",
"code": "const easternmost = 'Amon Dîn'\nlet easternBeacons = ['Eilenach', 'Nardol']\nconst centerBeacon = 'Erelas'\nlet westernBeacons = ['Min-Rimmon', 'Calenhad']\nconst westernmost = 'Amon Anwar'\nconst unshiftCalls = saveArguments(Array.prototype, 'unshift')\n\n// Your code\n\nequal(unshiftCalls.length, 0) // unshift should not be used"
},
{
"description": "beaconsLit is created without using concat",
"code": "const easternmost = 'Amon Dîn'\nlet easternBeacons = ['Eilenach', 'Nardol']\nconst centerBeacon = 'Erelas'\nlet westernBeacons = ['Min-Rimmon', 'Calenhad']\nconst westernmost = 'Amon Anwar'\nconst concatCalls = saveArguments(Array.prototype, 'concat')\n\n// Your code\n\nequal(concatCalls.length, 0) // concat should not be used"
},
{
"description": "beaconsLit has the 7 beacons lit",
"code": "const easternmost = 'Amon Dîn'\nlet easternBeacons = ['Eilenach', 'Nardol']\nconst centerBeacon = 'Erelas'\nlet westernBeacons = ['Min-Rimmon', 'Calenhad']\nconst westernmost = 'Amon Anwar'\n\n// Your code\n\nequal(beaconsLit.length, 7)"
},
{
"description": "beaconsLit has the right beacons",
"code": "const easternmost = 'Amon Dîn'\nlet easternBeacons = ['Eilenach', 'Nardol']\nconst centerBeacon = 'Erelas'\nlet westernBeacons = ['Min-Rimmon', 'Calenhad']\nconst westernmost = 'Amon Anwar'\n\n// Your code\n\nequal(beaconsLit, [\n 'Amon Dîn',\n 'Eilenach',\n 'Nardol',\n 'Erelas',\n 'Min-Rimmon',\n 'Calenhad',\n 'Amon Anwar',\n])"
},
{
"description": "beaconsLit should still work if the values are different",
"code": "const easternmost = 'Amon Din'\nlet easternBeacons = ['Eilenach']\nconst centerBeacon = 'नरडल'\nlet westernBeacons = ['Erelas', 'Min-Rimmon', 'Calenhad']\nconst westernmost = 'Amon Anwar (Halifirien)'\n\n// Your code\n\nequal(beaconsLit, [\n 'Amon Din',\n 'Eilenach',\n 'नरडल',\n 'Erelas',\n 'Min-Rimmon',\n 'Calenhad',\n 'Amon Anwar (Halifirien)',\n])"
}
]