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 | |
return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort(); | |
//recieve a string of text | |
function mostFrequentWord(text) { | |
//use getTokens function to remove falsy characters and get specific words from text |
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
https://repl.it/@benlevels/Make-student-reports-drill | |
https://repl.it/@benlevels/Enroll-in-summer-school-drill | |
https://repl.it/@benlevels/find-by-id-drill | |
https://repl.it/@benlevels/validate-object-keys-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
https://repl.it/@benlevels/Object-creator-drill | |
https://repl.it/@benlevels/Object-updater-drill | |
https://repl.it/@benlevels/Self-reference-drill | |
https://repl.it/@benlevels/Deleting-keys-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
1.) What is scope? Your explanation should include the idea of global vs. local scope. | |
Scope is the area within the context or boundaries of a program where behavior and state can be defined and implemented. | |
The context of global scope would be the entire program; whereas local scope's boundaries are within functions inside of | |
the program. | |
2.)Why are global variables avoided? | |
Global variables are often avoided because they can cause unwanted side effects within your program than can be difficult | |
to diagnose as the application grows. An example would be variables defined in the scope of the entire application that are | |
also used inside functions. When these functions sharing the same variables as those declared globally are initialized, | |
the global variable can be changed. Other functions relying on the global variable may cause unwanted errors or changes |
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
https://repl.it/@benlevels/min-and-max-without-sort-drill | |
https://repl.it/@benlevels/average-drill | |
https://repl.it/@benlevels/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
https://repl.it/@benlevels/Sort-drill | |
https://repl.it/@benlevels/Squares-with-map-drill | |
https://repl.it/@benlevels/Array-copying-II-drill | |
https://repl.it/@benlevels/Array-copying-I-drill | |
https://repl.it/@benlevels/Filter-drill | |
https://repl.it/@benlevels/Find-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
https://repl.it/@benlevels/Array-length-and-access-drill | |
https://repl.it/@benlevels/Accessing-array-items-drill | |
https://repl.it/@benlevels/Adding-array-items-drills | |
https://repl.it/@benlevels/Creating-arrays-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
https://repl.it/@benlevels/Error-alert-drill | |
https://repl.it/@benlevels/Traffic-lights-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
https://repl.it/@benlevels/Is-divisible-drill | |
https://repl.it/@benlevels/temperature-conversion-drill | |
https://repl.it/@benlevels/area-of-a-rectangle-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
https://repl.it/@benlevels/text-normalizer-drill | |
https://repl.it/@benlevels/shouter-drill | |
https://repl.it/@benlevels/Wiseperson-generator-drill |