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) { | |
// your code here | |
let phrase = ( | |
`A wise ${wiseType} once said: "${whatToSay}".`); | |
return phrase; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
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/@elenaG518/Is-divisible-drill | |
https://repl.it/@elenaG518/temperature-conversion-drill | |
https://repl.it/@elenaG518/area-of-a-rectangle-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/@elenaG518/Traffic-lights-drill | |
https://repl.it/@elenaG518/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/@elenaG518/Adding-array-items-drills | |
https://repl.it/@elenaG518/Creating-arrays-drill | |
https://repl.it/@elenaG518/Accessing-array-items-drill | |
https://repl.it/@elenaG518/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/@elenaG518/Array-copying-I-drill | |
https://repl.it/@elenaG518/Squares-with-map-drill-1 | |
https://repl.it/@elenaG518/Array-copying-II-drill | |
https://repl.it/@elenaG518/Sort-drill | |
https://repl.it/@elenaG518/Filter-drill | |
https://repl.it/@elenaG518/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/@elenaG518/min-and-max-without-sort-drill | |
https://repl.it/@elenaG518/average-drill | |
https://repl.it/@elenaG518/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
https://repl.it/@elenaG518/Object-creator-drill | |
https://repl.it/@elenaG518/Object-updater-drill | |
https://repl.it/@elenaG518/Self-reference-drill | |
https://repl.it/@elenaG518/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/@elenaG518/Make-student-reports-drill | |
https://repl.it/@elenaG518/Enroll-in-summer-school-drill | |
https://repl.it/@elenaG518/find-by-id-drill | |
https://repl.it/@elenaG518/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/@elenaG518/Cat-carousel-jQuery | |
https://repl.it/@elenaG518/return-of-fizz-buzz |
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 means where the variable lives and how it can be accessed. the value of global scoped variables var and let can be accessed and modified by any | |
function that refers to it. When you declare a variable in the global scope, it is available everywhere in your code. | |
Any variable that is declared outside of a function in JavaScript has global scope. When you declare a variable within a function, | |
that variable only lives within the function, meaning it's scope is local. This means that when you define a variable in a function that | |
has the same name as a variable in the global scope, the local variable will take precedence over the global one. | |
Why are global variables avoided? | |
Global variables should be avoided because they could inadvertently be reassigned a value by a function that refers to it, | |
even functions in a different file in which the global variable is being defined. This could create problems in the expected |
OlderNewer