checking in docs for github.io page

This commit is contained in:
Ken
2019-02-19 23:41:11 -08:00
parent e88ba9c448
commit 164db9dd93
194 changed files with 103939 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
// Generics for classes
class Stack<T = number> {
private data: T[] = [];
push(item: T) {
this.data.push(item);
}
pop(): T {
return this.data.pop();
}
}
const numberStack = new Stack();
const stringStack = new Stack<string>();
// Generics for functions
function reverse<T>(arg: T[]): T[] {
// TODO: implement the logic to reverse the array
return arg;
}
// adding an export to turn this into a "module"
export default {};