Weekly "You don't know JavaScritpt" chapter
- Session 1: Breaking the ice - 17/05/2017
- Session 2: Scope & Closures - 24/05/2017
- Chapters 2 & 3
- Session 2: Scope & Closures - 24/05/2017
- Chapter 4 (Hoisting)
namespace Sundio { | |
/** | |
* Node | |
* | |
* A simple implementation of a binary node. | |
*/ | |
export class Node <T> { | |
private _n: T; | |
private _lSon: Node <T>; |
namespace Sundio { | |
/** | |
* Computes how many ways someone can use to climb a given number of stairs by | |
* doing it in groups of two or one stair at time. | |
* | |
* @param stairs The number of stairs to climb. | |
* @returns The number of ways someone can climb the stairs. | |
*/ | |
export function howManyWays(stairs: number): number { | |
// For known values, return the result directly. |
/// <reference path="./typings/globals/node/index.d.ts" /> | |
namespace Sundio { | |
/** | |
* Vertex | |
*/ | |
export class Vertex { | |
private _color: number; | |
private _links: Vertex []; |