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 shouter(whatToShout) { | |
const shoutWords = whatToShout ; | |
return shoutWords.toUpperCase() + '!!!'; | |
} | |
/* 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
https://repl.it/@manny1806/Traffic-lights-drill | |
https://repl.it/@manny1806/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/@manny1806/Creating-arrays-drill | |
https://repl.it/@manny1806/Adding-array-items-drills | |
https://repl.it/@manny1806/Accessing-array-items-drill | |
https://repl.it/@manny1806/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/@manny1806/Array-copying-I-drill | |
https://repl.it/@manny1806/Array-copying-II-drill | |
https://repl.it/@manny1806/Squares-with-map-drill | |
https://repl.it/@manny1806/Sort-drill | |
https://repl.it/@manny1806/Filter-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/@manny1806/fizzbuzz-drill-js | |
https://repl.it/@manny1806/average-drill | |
https://repl.it/@manny1806/min-and-max-without-sort-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
1. Scope refers to the accessibility of a variable. If a variable is created outside of a function its scope is considered | |
to be global which means it can be accessed by any function in the javascript file. Global variables can even be accessed | |
by other linked Javascript files as long as the file with the global variable is loaded first. Variables that are created | |
in a function are considered to have local scope which means they can only be accessed within the function they were created | |
in. When a local scope variable is created that has the same as a global scope variable, the local variable will take | |
precedence over the global variable and not affect the global variable. | |
2. Global variables are avoided in Javascript because they can lead to unintended results. When more than one function uses | |
or alters a global variable it risks the outcome of the functions being not what is expected. One function might assume | |
a global variable has a certain value when in fact another function has |
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/@manny1806/Object-creator-drill | |
https://repl.it/@manny1806/Object-updater-drill | |
https://repl.it/@manny1806/Self-reference-drill | |
https://repl.it/@manny1806/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/@manny1806/Make-student-reports-drill | |
https://repl.it/@manny1806/Enroll-in-summer-school-drill | |
https://repl.it/@manny1806/find-by-id-drill | |
https://repl.it/@manny1806/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
// ================================================================================ | |
// You will be writing a series of functions beneath each block of comments below. | |
// Tackle each function one at a time. You may move on to a new exercise and return | |
// later. Run the code and the console to the right will tell you if your function | |
// is successfully passing the tests. | |
// ================================================================================ | |
function kmToMiles (numKm){ | |
return Math.floor(numKm/1.6); | |
} |
OlderNewer