This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# contrived sum function | |
function sum(a, b, c) { | |
let x = a + b; | |
let y = b + c; | |
let z = x + y - b; | |
return z; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Shipping() { | |
this.request = function (zipStart, zipEnd, weight) { | |
return 40; // assume calculations take place | |
} | |
}; | |
function ModifiedShipping() { | |
this.login = function(credentials) { | |
console.log("setting credentials"); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Design Pattern by Victor Hom | |
// Design Pattern - A reusable solution that can be applied to commonly occurring problems in software design. | |
// 3 main benefits | |
// 1. Patterns are solutions to problems. There is a degree of certainty that they work since they have been used widely over time | |
// 2. Patterns can be reused and can be easily adapted to different scenarios. It provides DRYness and you don't have to worry about | |
// compromising usability. | |
// 3. Patterns are expressive and offer a common vocabulary among technologists | |
// Patterns are not a solution. It is a plan/ template that describes how pieces interact to solve certain problems |
NewerOlder