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
| class Cat { | |
| constructor(name, interests) { | |
| this.name = name; | |
| this.interests = interests; | |
| this.unsubscribe = {}; | |
| } | |
| addUnsubscription(keyName, method) { | |
| this.unsubscribe[keyName] = method; | |
| } |
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
| const proxy = 'https://cors-anywhere.herokuapp.com/'; | |
| const CORSBlockedURL = 'https://www.some.block.url.com'; | |
| axios | |
| .get(`${proxy}${CORSBlockedURL}`) | |
| .then(res => { | |
| console.log("res in axios", res); | |
| }); |
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
| createIndex() { | |
| mkdir src | |
| cd src | |
| touch index.js | |
| cd .. # go back to root folder | |
| touch index.html | |
| } |
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 greaterThan( value, other ){ | |
| if( value > other ){ | |
| return 1; | |
| } else { | |
| return 0; | |
| } | |
| } | |
| function matchTheMatch(el) { | |
| if(el > 50 ){ |