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
Wiseperson https://repl.it/G8oY/1623 | |
Shouter https://repl.it/G8sD/1204 | |
Text Normalizer https://repl.it/G8sU/919 |
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
Area of a rectangle https://repl.it/G9Do/680 | |
Temp conversion https://repl.it/G9EI/771 | |
Is divisible https://repl.it/Mym1/0 |
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
Traffic light drill https://repl.it/Ggbk/1289 | |
Error alert solution https://repl.it/GgdO/8 |
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
Creating arrays https://repl.it/G9GB/1039 | |
Adding array items https://repl.it/G9GI/1068 | |
Accessing array items https://repl.it/G9GO/793 | |
Array length and access https://repl.it/G9GS/933 |
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
Array copying I https://repl.it/G9GV/latest | |
Array copying II https://repl.it/G9G7/latest | |
Squares with map https://repl.it/G9HI/latest | |
Sort https://repl.it/G9H5/latest | |
Filter https://repl.it/G9Hd/latest | |
Find https://repl.it/G9Hl/latest |
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
Min/max https://repl.it/G9KJ/latest | |
Compute the average https://repl.it/G9KO/1103 | |
fizz buzz https://repl.it/G9KW/1649 |
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? Your explanation should include the idea of global vs. local scope. // Scope ultimately determines how accessible the variables are within your code. Variables that are declared in the global scope are available for use throughout the file. Variables that are declared in the local scope are available for use only within their function and are not even visible outside of that function. It is important to not declare variables globally unless you have a very good reason to do so as this can create several issues within your code. Working within the local scope makes your code more dependable and agile moving forward. | |
Why are global variables avoided? // Declaring variables globally allows them to be accessed anywhere in the file which can result in difficult-to-troubleshoot bugs and issues with concurrency. It can also make code difficult to read and/or understand. By using local variables, you maintain a more limited scope and can work with a function (or other section of code) independently. T |
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
Object creator https://repl.it/G9Lb/latest | |
Object updater https://repl.it/G9Lf/latest | |
Self reference https://repl.it/G9Lj/latest | |
Deleting keys https://repl.it/G9Lo/latest |
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
Make student report https://repl.it/G9NG/latest | |
Enroll in summer school https://repl.it/G9N6/latest | |
Find by id https://repl.it/G9OF/latest | |
Validate object keys https://repl.it/G9OV/latest |
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
Line 1 declares function getTokens which passes in rawString as an argument. | |
Line 2 changes rawString to all lower case letters and removes all punctuation (with a split). It also filters out falsy items from the array and sorts alphabetically. | |
Line 6 declares function mostFrequentWord which passes in text as an argument. (?? what is "text" here?) | |
Line 7 declares variable words and assigns getTokens(text) as the value <~ why?. | |
Line 8 declares variable wordFrequencies and creates an empty object (denoted by {} and not [] which would be an array). | |
Line 9 begins a for loop with an if/else statment in it. The for conditions: i starts at the first position in the object(??) and for as long as i is less than or equal to the length of words (the variable declared on line 7), increment by 1 through the object(again??). | |
Lines 10-15 begin the if/else statment in the for loop... stating that if the word currently being evaluated in the loop is "in" the wordFrequencies object, continue iterating through else consider t |
OlderNewer