πΌ | πΆ π‘ | π π π π | π€ π€ πͺ | π± π₯ π© π± π± π£ π£ | π€ π π§ | π° π‘ | π π«
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 factorial = n => (n <= 1) ? 1 : n * factorial(n-1); | |
| console.log(factorial(0)); //1 | |
| console.log(factorial(1)); //1 | |
| console.log(factorial(3)); //6 | |
| console.log(factorial(4)); //24 | |
| console.log(factorial(5)); //120 |
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
| //Let's do some recursion! | |
| // What is recursion? Well, I got a great tip on explaining | |
| // this from the Youtuber, funfunfunction | |
| // whose video on the topic you can find here: | |
| // https://www.youtube.com/watch?v=k7-N8R0-KY4 | |
| // In short, a recursive fuction is a function that calls | |
| // itself... until it doesn't (we call that the base case) |
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
| // expectedResult.should.not.be( [null, null, null] ); | |
| mocha --reporter snoop | |
| ... | |
| 1 test failed: Expected [null, null, null] to not be like it is, but it do. |
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
| 0 info it worked if it ends with ok | |
| 1 verbose cli [ '/Users/davpoind2/.nvm/versions/node/v4.4.0/bin/node', | |
| 1 verbose cli '/Users/davpoind2/.nvm/versions/node/v4.4.0/bin/npm', | |
| 1 verbose cli 'run', | |
| 1 verbose cli 'commit' ] | |
| 2 info using [email protected] | |
| 3 info using [email protected] | |
| 4 verbose run-script [ 'precommit', 'commit', 'postcommit' ] | |
| 5 info precommit [email protected] | |
| 6 info commit [email protected] |
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
| davpoind2@DRP3:~/code/contrib/stack-overflow-copy-paste [git:pr/object-size] | |
| β: npm run commit | |
| > [email protected] commit /Users/davpoind2/code/contrib/stack-overflow-copy-paste | |
| > git-cz | |
| [email protected], [email protected] | |
| Line 1 will be cropped at 100 characters. All other lines will be wrapped after 100 characters. |
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
| //Null is a special thing in JavaScript, and I find it funny | |
| //What isi null? | |
| console.log(typeof null) | |
| // -> object | |
| // Cool! So, if I wanted to see how to use an object | |
| // Properties, functions, fun stuff | |
| // what would I do? List out them keys! | |
| Object.keys({'test': 'bob', 'bob': () => {}}).forEach(key => console.log(`Key from example: ${key}`)); |
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
| . | |
| βββ build | |
| βΒ Β βββ index.html | |
| βΒ Β βββ main.js | |
| βββ drp-redesign.md | |
| βββ drp_profile.png | |
| βββ node_modules | |
| βΒ Β βββ file-loader | |
| βΒ Β βββ README.md | |
| βΒ Β βββ index.js |
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
| The following is supposedly an actual question given on a University of Washington chemistry mid-term. The answer by one student was so | |
| "profound" that the professor shared it with colleagues, via the Internet, which is, of course, why we now have the pleasure of enjoying it as well. | |
| Is Hell exothermic (gives off heat) or endothermic (absorbs heat)?Most of the students wrote proofs of their beliefs using Boyle's Law (gas cools when it expands and heats when it is compressed) or some variant. | |
| One student, however, wrote the following: | |
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
| Object.prototype.toString = function() { | |
| console.log("NO STRINGS FOR YOU!!"); | |
| return null; | |
| } |