Tell us what’s happening:
i have removed the "is" and "not. but it still doesnt work, any suggestions?
Your code so far
function popShift(arr) {
let popped; arr.pop();
let shifted; arr.shift();
return [shifted, popped];
}
console.log(popShift(["challenge", "complete"]));
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36
.
Challenge: Remove Items from an Array with pop() and shift()
Link to the challenge: