I suggest you move on to another challenge. I just created a GitHub issue for this challenge, which currently is not passing tests because they rely on a function that creates an anonymous object not mentioned in the instructions.
Modeling the Stack as an object containing an array of data worked fine for me.
The Clear function passed only when I forced the array.length =0. Assigning an empty array and pop/shift all elements weren’t accepted!
I did a similar implementation using my own internal node structure, but this lab’s verification steps is verifying the internal data structure instead of verifying the output of the functions. The internal data structure it is expecting is an array so you can’t use nodes.
The user story is lacking.. It doesn’t mention to use an array as an internal data structure. It also doesn’t mention that you need to create an initStack() method, which you do need to implement.
After skipping to the next Lab - Implement a Queue and seeing it’s functions given to the students, it looks like the critical piece for this lab to create a Stack is the following code that should be given to students as well.
function initStack() {
return { collection: [] };
}