im so lost plez help
faziz6006 (2)

function exerciseFour(numbers){
// Exercise Four: You will be given an array called 'numbers'
// Using an array method, add a number (any number) to the beginning of the array

// Please write your answer on the line above.
return numbers;
}

function exerciseFive(nextInLine){
// Exercise Five: you will be given an array called 'nextInLine'
// Using an array method, remove the first person from the array.

// Please write your answer on the line above.
return nextInLine;
}

You are viewing a single comment. View All
vedprad1 (693)

It hink you are using JavaScript, so I will answer with that.

Exercise Four

Use the unshift() method.

function exerciseFour(numbers) {
  numbers.unshift(0);
}

Exercise Five

Use the shift() method.

function exerciseFive(nextInLine) {
  nextInLine.shift();
}

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!