1
Help ANYONE? these questions are killing me ?
faziz6006 (2)

( java script)
function exerciseTwo(snacks){
// Exercise Two: you will be given an array called 'snacks'
// Using an array method, add your favorite snack to the end of the array

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

function exerciseThree(tasks){
// Exercise Three: You will be given an array called 'tasks'
// Using an array method, remove the task from the end of the array
array = [chips];
// Please write your answer on the line above.
return tasks;
}

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
1
vedprad1 (463)
function exerciseTwo(snacks){
snacks.push('French Fries');
return snacks;
}

function exerciseThree(tasks){
tasks.pop();
return tasks;
}

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

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

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