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 wisePerson(wiseType, whatToSay) { | |
return `A wise ${wiseType} once said: "${whatToSay}".`; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
*/ |
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 computeArea(width, height) { | |
return width*height; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
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 doTrafficLights() { | |
const activeLight = getActiveLight(); | |
if(activeLight === 'red') { | |
turnRed(); | |
} | |
if(activeLight === 'yellow'){ | |
turnYellow(); | |
} | |
if(activeLight === 'green'){ | |
turnGreen(); |
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/@secilreel/Creating-arrays-drill | |
https://repl.it/@secilreel/Adding-array-items-drills | |
https://repl.it/@secilreel/Accessing-array-items-drill | |
https://repl.it/@secilreel/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/@secilreel/Array-copying-I-drill | |
https://repl.it/@secilreel/Array-copying-II-drill | |
https://repl.it/@secilreel/Squares-with-map-drill | |
https://repl.it/@secilreel/Sort-drill | |
https://repl.it/@secilreel/Filter-drill | |
https://repl.it/@secilreel/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/@secilreel/min-and-max-without-sort-drill | |
https://repl.it/@secilreel/average-drill | |
https://repl.it/@secilreel/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
Scope defines where Java Script can find a variable. If the variable is defined within a function, it has a block scope. | |
Otherwise, if the variable is outside of a function, it has a global scope. Global Scopes should be avoided because it might | |
change variables in other parts of the code, even outside of the original file. This is an undesirable side effect.Side | |
effects happen when a function reaches outside of its local scope and up into its parent; and, alters a value that is in there. | |
A side effect might create an indeterminate code, meaning a code that might not give the same result every time it runs. | |
To debug such a code would be both hard and frustrating. Instead, it is a good practice to have pure codes, which have no side | |
effects and are determinate, meaning they give the same result every time it runs. In order to avoid undesired side effects, | |
and not change variables in the global scope, it is a good practice to write 'strict mode' at the top of Java Script. Strict | |
mode will only allow chang |
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/@secilreel/Object-creator-drill | |
https://repl.it/@secilreel/Object-updater-drill | |
https://repl.it/@secilreel/Self-reference-drill | |
https://repl.it/@secilreel/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/@secilreel/Make-student-reports-drill | |
https://repl.it/@secilreel/Enroll-in-summer-school-drill | |
https://repl.it/@secilreel/find-by-id-drill | |
https://repl.it/@secilreel/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
https://repl.it/@secilreel/most-frequent-word-analyzer-challenge |
OlderNewer