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
| //Wise Person Drill | |
| https://repl.it/@Stompy32/Wiseperson-generator-drill | |
| //Shouter Drill | |
| https://repl.it/@Stompy32/shouter-drill | |
| //String Normalizer | |
| https://repl.it/@Stompy32/text-normalizer-drill |
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
| //Area of a rectangle | |
| https://repl.it/@Stompy32/area-of-a-rectangle-drill | |
| //Temperature conversion | |
| https://repl.it/@Stompy32/temperature-conversion-drill | |
| //Is divisable drill | |
| https://repl.it/@Stompy32/Is-divisible-drill |
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
| //Traffic Light | |
| https://repl.it/@Stompy32/Traffic-lights-drill | |
| //Error Alert | |
| https://repl.it/@Stompy32/Error-alert-drill |
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
| //Creating Arrays | |
| https://repl.it/@Stompy32/Creating-arrays-drill | |
| //Adding array items | |
| https://repl.it/@Stompy32/Adding-array-items-drills | |
| //Accessing array items | |
| https://repl.it/@Stompy32/Accessing-array-items-drill | |
| //Array length and access |
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
| //Array Copying I | |
| https://repl.it/@Stompy32/Array-copying-I-drill | |
| //Array Copying II | |
| https://repl.it/@Stompy32/Array-copying-II-drill | |
| //Squares with map | |
| https://repl.it/@Stompy32/Squares-with-map-drill | |
| //Sort |
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
| //Max/min drill | |
| https://repl.it/@Stompy32/min-and-max-without-sort-drill | |
| //Compute the average | |
| https://repl.it/@Stompy32/average-drill | |
| //fizz buzz | |
| https://repl.it/@Stompy32/fizzbuzz-drill-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
| In javascript scope is the idea that variables are only accessible within a certain context. | |
| Where the variable is declared is considered to be its lexical scope. Variables created in the highest lexical scope | |
| otherwise known as the 'global scope' are gernerally considered a bad idea. Globals can potentially intoduce unintended | |
| variable assignment that make your program hard to reason about. If you are not careful declaring global variables can cause your functions to produce side effects. | |
| Function side effects are when a function changes something outside of its scope. Sometimes side effects are intentional such as saving data to a data base. | |
| When function side effects are unintentional is when bugs can arise. Its considered good practice to make your functions 'pure' (without side effects) unless you have a specific reason. | |
| We can utilize 'use strict'; in javascript as a safe guard agains creating global vaiables. When in strict mode the javascript engine will throw an error whenever a global variable is d |
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 Creator | |
| https://repl.it/@Stompy32/RealisticGrimFactor | |
| //Object Updater | |
| https://repl.it/@Stompy32/Object-updater-drill | |
| //Self-Reference | |
| https://repl.it/@Stompy32/Self-reference-drill | |
| //Deleting Keys |
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
| //Make student reports | |
| https://repl.it/@Stompy32/Make-student-reports-drill | |
| //Enroll in summer school | |
| https://repl.it/@Stompy32/Enroll-in-summer-school-drill | |
| //Find by id | |
| https://repl.it/@Stompy32/find-by-id-drill | |
| //Validate object keys |
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 getTokens(rawString) { | |
| // NB: `.filter(Boolean)` removes any falsy items from an array | |
| //returns an array of words that are lowercase and sorted alphabetically | |
| return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort(); | |
| } | |
| function mostFrequentWord(text) { | |
| let words = getTokens(text); | |
| //creates an empty object |
OlderNewer