This file contains 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
https://repl.it/@jeffreymahmoudi/Wiseperson-generator-drill | |
https://repl.it/@jeffreymahmoudi/shouter-drill | |
https://repl.it/@jeffreymahmoudi/text-normalizer-drill |
This file contains 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
https://repl.it/@jeffreymahmoudi/area-of-a-rectangle-drill | |
https://repl.it/@jeffreymahmoudi/temperature-conversion-drill | |
https://repl.it/@jeffreymahmoudi/Is-divisible-drill |
This file contains 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
https://repl.it/@jeffreymahmoudi/Traffic-lights-drill | |
https://repl.it/@jeffreymahmoudi/Error-alert-drill |
This file contains 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
https://repl.it/@jeffreymahmoudi/Creating-arrays-drill | |
https://repl.it/@jeffreymahmoudi/Adding-array-items-drills | |
https://repl.it/@jeffreymahmoudi/Accessing-array-items-drill | |
https://repl.it/@jeffreymahmoudi/Array-length-and-access-drill |
This file contains 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
https://repl.it/@jeffreymahmoudi/Array-copying-I-drill | |
https://repl.it/@jeffreymahmoudi/Array-copying-II-drill | |
https://repl.it/@jeffreymahmoudi/Squares-with-map-drill | |
https://repl.it/@jeffreymahmoudi/Sort-drill | |
https://repl.it/@jeffreymahmoudi/Filter-drill | |
https://repl.it/@jeffreymahmoudi/Find-drill |
This file contains 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
https://repl.it/@jeffreymahmoudi/min-and-max-without-sort-drill | |
https://repl.it/@jeffreymahmoudi/average-drill | |
https://repl.it/@jeffreymahmoudi/fizzbuzz-drill-js |
This file contains 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
What is scope? | |
Scope defines how variables can or cannot be accessed in different places in code. Global scope allows all code to use the variable while block scope is restriced to the block it is defined in. | |
Why are global variables avoided? | |
Global variables can cause side effects like causing a function to become indeterminate. | |
Explain JavaScript's strict mode. | |
Strict mode forces all functions to use let or const when defining a variable. | |
What are side effects, and what is a pure function? |
This file contains 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
https://repl.it/@jeffreymahmoudi/Object-creator-drill | |
https://repl.it/@jeffreymahmoudi/Object-updater-drill | |
https://repl.it/@jeffreymahmoudi/Self-reference-drill | |
https://repl.it/@jeffreymahmoudi/Deleting-keys-drill |
This file contains 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
https://repl.it/@jeffreymahmoudi/Make-student-reports-drill | |
https://repl.it/@jeffreymahmoudi/Enroll-in-summer-school-drill | |
https://repl.it/@jeffreymahmoudi/find-by-id-drill | |
https://repl.it/@jeffreymahmoudi/validate-object-keys-drill |
This file contains 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 | |
return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort(); | |
} | |
function mostFrequentWord(text) { | |
// Turn the text into an array of tokens | |
let words = getTokens(text); | |
// Create an empty object to hold data about each word. | |
let wordFrequencies = {}; |
OlderNewer