Implement a Stack - Implement a Stack

Tell us what’s happening:

Hi, my test is not passing tests 2 and 4 already. It’s also failing test 6, which i don’t understand at all - how should pop return falsy values? It either returns undefined or the popped element as it is…?
Maybe i’m not understanding how the lab itself should be implemented…? The functions i wrote look pretty simple so far and they work. I read there was a bug almost 2 months ago, is it still bugged maybe?

Your code so far

function initStack() {
  return {
    collection: []
  };
}

function push(element,stack) {
  stack.collection.push(element);
}

function pop(stack) {
  if (stack.collection.length === 0) {
    return undefined;
  }
  return stack.collection.pop();
}

console.log(pop({ "collection": [1,2,3,4,5] })); // 5

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36 Edg/148.0.0.0

Challenge Information:

Implement a Stack - Implement a Stack

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-implement-a-stack/69a92f0b9cc04bb0d5327bb5.md at main · freeCodeCamp/freeCodeCamp · GitHub

I found the issue - the test requires the parameters in the push function to be in the order (stack, element) and does not accept (element, stack) even if the functionality doesn’t change.
This change corrected the test 4 and 6 too.