Tell us what’s happening:
None of the tests work on this lesson unless you add “let” before collection, which is above the “Only change code below this line” line. Break this one little rule, and you should be good to go.
Your code so far
function Stack() {
collection = [];
this.print = function() {
console.log(collection);
};
// Only change code below this line
// Only change code above this line
}
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/coding-interview-prep/data-structures/create-a-stack-class/