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 howManyNum7s (num) { | |
| if (typeof num !== 'number' || | |
| isNaN(num) || | |
| !isFinite(num)) { | |
| return 'Please pass in a correct number.'; | |
| } | |
| if (num<7) { | |
| return 0; | |
| } |
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 printSequence (num) { | |
| if (typeof num !== 'number' || | |
| isNaN(num) || | |
| !isFinite(num)) { | |
| console.log('Please pass in a correct number.'); | |
| return; | |
| } | |
| let result = ''; | |
| let temp = ''; |
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
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |