Stack
class Stack {
constructor() {
this.data = [];
}
peek(){
return this.data[this.data.length - 1];
}
push(value) {
this.data.push(value);
return this;
}
pop(){
this.data.pop();
return this;
}
isEmpty() {
return this.data.length === 0;
}
}INFO