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
For my crime map api, I will be utilizing a tool from spotcrime.com and creating a search parameter for people who want to know what their neighborhoods are really like while they are not watching. In essence, this gives people the info they need to make strong and informative decisions. This will also allow end-users to learn about different crimes committed and tips on how to spot, prevent and ultimately correct wanna-be criminals. | |
End-users will input their addresses of where they live or will live and through the search parameter passed in, a map will be rendered of the given location(s) and the crime that has been committed there. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="This is an API call."> | |
<title>Api Prac app</title> | |
<link rel="stylesheet" type="text/css" href="main.css"> | |
</head> | |
<body> | |
<h1>Search Youtube Videos Via an API Call</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>repl.it</title> | |
<link href="main.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> | |
<nav> |
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 makelight(){ | |
$(".lightbulb").click(function(event){ | |
$(".lightbulb").removeClass("bulb-on"); | |
$(event.currentTarget).addClass("bulb-on"); | |
}); | |
$(function(){ | |
makeLight(); | |
}); | |
}) |
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 createMyObject() { | |
return { | |
foo: "bar", | |
answerToUniverse: 42, | |
'olly olly': "oxen free", | |
sayHello: function() { | |
return 'hello'; | |
} | |
} | |
} |
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 - how the Javascript intepreter finds and executes your variables. If they are local variables, then we have local scope within a function. A global variable is one found outside of a function just hanging out in the code. | |
Why are global variables avoided? - Global variables are avoided as the variable could be utilized inside many other files and or snippets of your code. This could alter your data. | |
Explain JavaScript's strict mode - this enforces good scope practice and makes you use "var" within your variable declaration. | |
What are side effects, and what is a pure function? -side affects are both good and bad. THe good is when changing data within a DB. Bad is when code changes. Pure function is when the function is written and executed appropriately. | |
Explain variable hoisting in JavaScript. - How the JS intepreter parses your functions and variables. |
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 main() { | |
try { | |
doAllTheThings(); | |
} | |
catch(e) { | |
console.error(e); | |
reportError(e); | |
} | |
} |
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/G9Do/1 | |
function computeArea(width, height) { | |
return (width * height); | |
} | |
/* 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/G8sD/76 | |
function shouter(whatToShout) { | |
return whatToShout.toUpperCase() + "!!!"; | |
} | |
/* 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
NewerOlder