Skip to content

Instantly share code, notes, and snippets.

View sweick23's full-sized avatar

Shane Weickum sweick23

View GitHub Profile
<!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">
https://jsbin.com/famuvah/edit?html,js,console,output
https://jsbin.com/sirike/edit?js,console
https://jsbin.com/jaxenec/edit?js,console
@sweick23
sweick23 / gist:ece5b14e39cf25e5ae12527b949f4427
Created February 20, 2017 01:48
JavaScript Number Drills
https://jsbin.com/yoqecel/edit?console
https://jsbin.com/fijepu/edit?console
https://jsbin.com/wisigal/edit?console
https://jsbin.com/ceniqa/edit?js,output
https://jsbin.com/hurocic/edit?js,console,output
https://jsbin.com/fexahox/edit?js,console
https://jsbin.com/nenihet/edit?js,console
https://jsbin.com/fitosew/edit?js,console
https://jsbin.com/yowoca/edit?js,console
https://jsbin.com/quzijuh/edit?js,console
https://jsbin.com/wutuqub/edit?js,console
https://jsbin.com/yasuka/edit?js,console
https://jsbin.com/levehu/edit?js,console
https://jsbin.com/vuxecaf/edit?js,console
https://jsbin.com/vowezum/edit?js,console
@sweick23
sweick23 / gist:58c772a0432829086b68b0c7e639d443
Created February 22, 2017 16:15
Arrays and Loops Drills
https://jsbin.com/simorek/edit?js,console
https://jsbin.com/juqujon/edit?js,console
https://jsbin.com/votipax/edit?js,console
@sweick23
sweick23 / gist:6d567ba1abe379ecec5a9a82e95d98e8
Created February 23, 2017 07:45
Challenge: In your own words
What is scope? Your explanation should include the idea of global vs. local scope.
Why are global variables avoided?
Explain JavaScript's strict mode
What are side effects, and what is a pure function?
Explain variable hoisting in JavaScript
Scope is the way that JavaScript accesses variables in your code. The two different types of scope are global scope and local
scope. Global scope removes all boundaries from the variable declared. This allows all functions and other JavaScript files that
have access, to use the variable. Local scope is the scope within a function that only that function has access to.
A global variable should be avoided because if you write a function that is not pure, it could unintentionally manipulate
https://jsbin.com/qifuje/edit?js,console
https://jsbin.com/turilev/edit?js,console
https://jsbin.com/kosegef/edit?js,console
https://jsbin.com/zatucu/edit?js,console
https://jsbin.com/weterey/edit?js,console
https://jsbin.com/zokapac/edit?js,console
https://jsbin.com/pivacoc/edit?js,console
https://jsbin.com/balujas/edit?js,console
https://jsbin.com/givilu/edit?js,console
@sweick23
sweick23 / gist:c61f91a1e6095cdeeeb18c37522aa014
Created February 24, 2017 08:30
Challenge: analyze a most frequent word program.
function mostFrequentWord(text) {
//calls the getTokens function
var words = getTokens(text);
//used to create Objects from the//text
var wordFrequencies = {};