Skip to content

Instantly share code, notes, and snippets.

View DikshaSach's full-sized avatar

Diksha Sach DikshaSach

View GitHub Profile
@DikshaSach
DikshaSach / String drills
Last active January 8, 2018 17:32
String Drills for web dev 001
https://repl.it/@sachdiksha/Wiseperson-generator-drill
https://repl.it/@sachdiksha/shouter-drill
https://repl.it/@sachdiksha/text-normalizer-drill
https://repl.it/@sachdiksha/area-of-a-rectangle-drill
https://repl.it/@sachdiksha/temperature-conversion-drill
https://repl.it/@sachdiksha/Is-divisible-drill-1
https://repl.it/@sachdiksha/Traffic-lights-drill
https://repl.it/@sachdiksha/Error-alert-drill
https://repl.it/@sachdiksha/Creating-arrays-drill-2
https://repl.it/@sachdiksha/Adding-array-items-drills
https://repl.it/@sachdiksha/Accessing-array-items-drill
https://repl.it/@sachdiksha/Array-length-and-access-drill
https://repl.it/@sachdiksha/Array-copying-I-drill
https://repl.it/@sachdiksha/Array-copying-II-drill
https://repl.it/@sachdiksha/Squares-with-map-drill
https://repl.it/@sachdiksha/Sort-drill
https://repl.it/@sachdiksha/Filter-drill
https://repl.it/@sachdiksha/Find-drill
https://repl.it/@sachdiksha/min-and-max-without-sort-drill
https://repl.it/@sachdiksha/average-drill
https://repl.it/@sachdiksha/fizzbuzz-drill-js
Scopes are essential in javascript. There are two types of scopes global and local. A global scope is a variable that is set outside a function and the value of this variable can be manipulated throughout the program. A local scope is a variable that is set inside of a function which can only be used in that function and no where else. A local variable however can have the same name as a global variable set outside the function but it is a seperate variable and has no effect on the global varaiable. Variables with global scopes are avoidable because they can be read and manipulated which can lead to the variable changing. This can lead to code errors because if one function manipulated the variable and modified it another function might need the original variable in it but since it has been changed globally the new function will be getting the wrong data.
In normal javascript mistyping a variable name can create a new global variable however in strict mode mistyping will lead to an error and it would be i
https://repl.it/@sachdiksha/Object-creator-drill
https://repl.it/@sachdiksha/Object-updater-drill
https://repl.it/@sachdiksha/Self-reference-drill
https://repl.it/@sachdiksha/Deleting-keys-drill
https://repl.it/@sachdiksha/Make-student-reports-drill
https://repl.it/@sachdiksha/Enroll-in-summer-school-drill-1
https://repl.it/@sachdiksha/find-by-id-drill
https://repl.it/@sachdiksha/validate-object-keys-drill
https://repl.it/@sachdiksha/most-frequent-word-analyzer-challenge