Commit 1503bcb8 authored by ccottier's avatar ccottier

added some real solid work

parent da3a8548
......@@ -44,6 +44,7 @@ document.addEventListener("DOMContentLoaded", ()=> {
const returned = imGonnaReturnMyself();
const counterFactory = () => {
//nifty closure here
let count = 0;
return (
() => {
......@@ -81,6 +82,86 @@ document.addEventListener("DOMContentLoaded", ()=> {
console.log("string>");
break;
}
//REVIEW TOPICS FROM PRADEEP
// Variables - Scopes
const globalScopedVar = "worldwide";
function funcScope(){var funcScopedVar;}
if (true){
let blockScopeVar;
}
// Functions
function regFunction (arg){
console.log(arg);
}
const arrowFunc = () => "look out I'm pointy";
(function(){return "I'm just an IIFE"})();
class ImAClass {
static method= () => {
console.log("I'm a method of " + this.toString());
}
static toString(){
return "ImAClass";
}
}
const methodFunc = ImAClass.method;
methodFunc();
// Operators
const add = 2 + 2;
const sub = 2 - 10000000;
const mult = 4 * 4;
const division = 5/5/5;
const mod = 10 % 2;
const exp = 3**3;
// Conditional statements
if (true) {
const iWill = "do this";
} else if (null === true) {
const iWould = "do this instead";
} else {
console.log("something bad has happened if you've gotten here");
}
//see my switch above
// Loops
for (let i = 9; i < 100; i += 2){
//something looping about 45 times
}
let condition = true;
while (condition){
let thoughtProcess = "better set this condition to false";
condition = false;
}
function something(){
console.log("ta da")
}
do {
something();
} while (undefined);
console.log("we are at the conclusion, thanks for your time.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment