Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
| // Basic Types | |
| let id: number = 5 | |
| let company: string = 'Traversy Media' | |
| let isPublished: boolean = true | |
| let x: any = 'Hello' | |
| let ids: number[] = [1, 2, 3, 4, 5] | |
| let arr: any[] = [1, true, 'Hello'] | |
| // Tuple |
| class Stack { | |
| constructor() { | |
| this.items = [] | |
| this.count = 0 | |
| } | |
| // Add element to top of stack | |
| push(element) { | |
| this.items[this.count] = element | |
| console.log(`${element} added to ${this.count}`) |
| // Construct Single Node | |
| class Node { | |
| constructor(data, next = null) { | |
| this.data = data; | |
| this.next = next; | |
| } | |
| } | |
| // Create/Get/Remove Nodes From Linked List | |
| class LinkedList { |
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test