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; }
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;
}
It hink you are using JavaScript, so I will answer with that.
Exercise Four
Use the
unshift()
method.Exercise Five
Use the
shift()
method.If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!