Back to Freecodecamp

Step 3

curriculum/challenges/english/blocks/workshop-space-mission-roster/694c84330cbe604821b9deef.md

latest769 B
Original Source

--description--

Mission control requires a method for adding new members to the roster. Create an empty function named addCrewMember that accepts two parameters, crew and astronaut.

--hints--

You should create a function named addCrewMember.

js
assert.isFunction(addCrewMember);

Your addCrewMember function should have parameters crew and astronaut.

js
const regex = __helpers.functionRegex('addCrewMember', ['crew', 'astronaut']);
assert.match(__helpers.removeJSComments(addCrewMember.toString()), regex);

--seed--

--seed-contents--

js
const squad = [];

const firstAstronaut = {
  id: 1,
  name: "Andy",
  role: "Commander",
  isEVAEligible: true,
  priority: 3
};

--fcc-editable-region--

--fcc-editable-region--