doing step 4 demo notes

This commit is contained in:
Ken
2019-02-22 15:02:53 -08:00
parent 61f7eb6ce5
commit 79fdc8cd47
8 changed files with 63 additions and 29 deletions

View File

@@ -1 +1,13 @@
// Place your implementation from Step 2-01 exercise here
export class Stack<T> {
private _items: T[] = [];
push(item: T) {
this._items.push(item);
}
pop(): T {
if (this._items.length > 0) {
return this._items.pop();
}
}
}